Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adds Apple Pencil drawing to iOS, iPadOS and visionOS apps via PKCanvasView, PKToolPicker and PKDrawing with export and stroke inspection.
73% 95%+23 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 16 of 22 without it.
I have two separate vector drawing objects captured at different times and need to merge them into a single drawing structure without modifying the source objects. Which method should I use?
Uses drawing1.appending(drawing2) to create a combined drawing without mutating the original.
3 of 3 safety checks passed
Capture Apple Pencil and finger input using PKCanvasView, manage drawing
tools with PKToolPicker, serialize drawings with PKDrawing, and wrap PencilKit in SwiftUI.
PencilKit requires no entitlements or Info.plist entries. Import PencilKit
and create a PKCanvasView.
import PencilKit
Platform availability: iOS 13+, iPadOS 13+, Mac Catalyst 13.1+, visionOS 1.0+.
canvasView.drawing from
canvasViewDrawingDidChange(_:); keep the previous persisted revision until
the new revision completes the remaining checkpoints.dataRepresentation(), write atomically, and run the
decode validate/fix/retry loop. Do not mark
bytes valid when PKDrawing(data:) still throws.Next to this one in the catalogue, plus more from the same author.