I have a subview over my view and i want this subview only to recognize pencil touch types. Every time the touch type is a finger i want it to be recognized by the parent view. Currently i am using the function shown below. The problem here is that the UIEvent has no touches so its not possible to check if it is a finger or pencil touch.
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
return false
}
Update
One option would be disabling user interaction on the bottom view, and in the top view implementing:
In these functions, you can check the type with
touches.first?.type, and you can check the view withtouches.first?.view, and if they satisfy your criteria you can calltouchesBegan/Moved/Endedon the bottom view.What it said before:
Use these three methods:
You can check they type with touches.first?.type, and you can check the view with touches.first?.view.
You could forward the touches by calling
touchesBegan/Moved/Endedon the view underneath.