Not all objects in iOS can handle events, only objects that inherit Uiresponder can receive and handle events. What we call "Responder objects" uiapplication, Uiviewcontroller, UIView inherit from Uiresponder, so they are all responder objects that are able to receive and handle the event UIView is a subclass of Uiresponder, The following 4 methods can be overridden to handle different touch events uievent to obtain which particular event touch, accelerate, touch event. By default, all UIView do not support two fingers. To set up, it is best not to engage in multiple fingers, moving without knowing which finger to engage in the occurrence and transmission of the position event: 1. After a touch event occurs, the system adds the event to an event queue managed by UIApplication 2. UIApplication takes the first event out of the event queue and distributes the event for processing, typically sending an event to the application's main window (Keywindow) 3. The main window will find the most appropriate view in the view hierarchy to handle touch events, which is the first step in the entire event processing process to draw the various view public event handling methods into the parent class __func__ gets the method in which class is called · Touch event delivery is passed from the parent control to the child control o click on the green view:uiapplication->uiwindow-> white-Green O-click on the Blue view:uiapplication->uiwindow- > White, Orange, blue Ø Click Yellow view:uiapplication->uiwindow-> White
iOS Event handling