I. The process of event delivery
1. The user fingers touch the screen, resulting in an event object
2. The event object is added to the event queue (FIFO)
3. Processing of event objects in the event queue taken by uiapplication
4.UIApplication will first pass the event object to the primary UIWindow
(Of course, you must first detect if UIWindow can receive and deliver events)
5.UIWindow iterates through all the child controls to see if the touch points fall on one of the child controls:
1> If the touch point does not fall on the child control, then the event is handled directly by UIWindow, and the event is passed
2> if the touch point falls on the child control V1, then iterate through all of the V1 's child controls, repeating the previous 5 steps
(The last child control starts the traversal)
6. Eventually, a UIView object that is best suited to handle the event is sent, and the corresponding message is given to the UIView object, that is, the corresponding method of calling UIView (Touchesbegan ...), informing it that it was touched.
Second, the process of event processing
(That is, Touchesbegan, touchesmoved, touchesended method Internal processing process)
If you override these 3 methods and do not call back the Super method, the default behavior of the parent class is ignored
1. Default Practice:
1> the event object along the responder chain and eventually passes it to the uiapplication
2> if the middle chain breaks, it's not going to go up.
2. Overriding the default behavior of the parent class, the event will not be passed up, and the responder chain will be broken off
3. The transmission of events and the handling of events are essentially reciprocal processes
Three, Pointinside:withevent: method