In iOS learning, touch events are the most touching, and this section focuses on the simple use of touch events.
Events in 1.iOS
2. Touch Events
2.1 The full process of touch events:
1> the event object from the top down (passed by the parent control to the child control), finds the most appropriate control to handle the event
2> calls the touches of the most appropriate control ..... Method
3> if a [super touches ...] is called; Will pass the event along the responder chain to the previous responder
4> then calls the last responder's touches .... Method
2.2 What is a responder chain?
1> Responder chain is a chain of multiple responder objects (what is the Responder object: the object that can handle the event)
2> uses the responder chain to allow multiple controls to handle the same touch event
3> How to use the chain to pass up? Who was the last responder
2.3 What is the role of the responder chain?
Allows multiple responders to respond to the event at the same time as a touch event occurs
2.4 Who is the last responder (Nextresponder)
1> If the current view is a view of the controller, then the controller is the last responder
2> If the current view is not the controller's view, then the parent control is the last responder
2.5 illustrations
iOS Learning note-ios event handling Touch events