First, the user in the process of using the app, will produce a variety of events. The events in iOS can be divided into 3 major types:
Second, the responder object
- Only objects that inherit Uiresponder in iOS can accept and handle events, which are called "responder objects"
- UIApplication, Uiviewcontroller, and UIView inherit from Uiresponder, so they are all responder objects and can accept and handle events
- Uiresponder internally provides the following methods to handle events
Third, the practice of UIView touch events are familiar
Iv. Uitouch
- One finger corresponds to a Uitouch object
- Uitouch: Holds information related to a finger, such as the position, time, and stage of a touch
- Note: In iphone development, to avoid using double-click events!
V. Methods of Uitouch
Vi. examples of event delivery
Vii. UIView cannot receive three cases of touch events
Viii. exercises based on UIView touch events--the ability to drag UIView
iOS Edge Learning-touch events and uiview exercises that can be dragged