Why is hitTest:withEvent: called three times for each touch?

From the docs: This method traverses the view hierarchy by sending the pointInside:withEvent: message to each subview to determine which subview should receive a touch event. If pointInside:withEvent: returns YES, then the subview’s hierarchy is traversed; otherwise, its branch of the view hierarchy is ignored. You rarely need to call this method yourself, but you might override it to hide touch events from subviews.

The view does not have any subviews. If I add subviews to it, it still gets three hitTest:withEvent: messages. Adding or removing sibling views doesn't change the result either.

– James Huddleston Jul 12 at 14:49 Maybe check here, this post may help clarify what's going on: stackoverflow. Com/questions/4961386/… – crgt Jul 12 at 23:55.

You should check to see if the subtype and type property are all the same. Those 3 events do make sense since there's event that needs to be triggered in order for the OS to understand the nature of the touch event. For example, swipe, pinch and tap all start with the same touch event.My guess is that the first two are fired 1 to register the tap event and the second to test for tap event to "move".

The second is called not long afterwards probably to either cancel the pinching/zooming/whatever. Bottom line, the documentations talks about 3 different type of events: touch, motion and remote events. UIEvent Class Reference.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions