Implementing a custom Gesture in SwiftUI

Hi everyone!

I am building a drawing app and want to detect Pencil/Finger touches separately. I know that one can combine multiple standard gestures but I am thinking of a custom implementation of the Gesture Protocol to wrap a gesture recognizer.

thanks

After discovering TapGesture does not provide location information, I started looking into this too. I hope that Apple improves documentation for implementing custom gestures. Right now it doesn't really have much. For example, the documentation for the body member is "The content and behavior of the gesture" - which is great, but if we could get a little more information on how to read UI Events that would be great!

Implementing a custom Gesture in SwiftUI
 
 
Q