I’m testing simultaneous finger and Apple Pencil input with PencilKit and have reduced the behaviour to a minimal PKCanvasView.
import SwiftUI
struct ContentView: View {
var body: some View {
PencilCanvas()
.ignoresSafeArea()
}
}
struct PencilCanvas: UIViewRepresentable {
func makeUIView(context: Context) -> PKCanvasView {
let canvas = PKCanvasView()
canvas.drawingPolicy = .anyInput
return canvas
}
func updateUIView(_ canvas: PKCanvasView, context: Context) {}
}
On a physical iPad with Apple Pencil, I consistently see this behaviour:
Start drawing with a finger and keep the finger moving.
Touch the canvas with Apple Pencil.
The active finger stroke immediately stops, while the Pencil can draw.
The reverse order behaves differently:
Start drawing with Apple Pencil and keep it moving.
Touch/draw with a finger.
The Pencil stroke continues rather than being cancelled.
I’ve also confirmed that a newly created PKCanvasView reports isMultipleTouchEnabled == true, and explicitly setting it to true does not change the behaviour.
Is simultaneous independent Apple Pencil and finger drawing supported by PKCanvasView when using .drawingPolicy = .anyInput?
If so, is there a supported configuration or gesture-recognizer setting required to prevent the Pencil from cancelling an active finger stroke?
Or is Pencil taking priority over an active finger drawing gesture expected behaviour in PencilKit?
1
0
323