iOS common event handling mechanism, there are three ways:
1. Bind a specific event of a control to the specified mode of the controller by Ibaction binding, and when this event occurs on the control, the corresponding method to which the control will be triggered.
Example: Is the way to drag the line.
2. Bind event listeners to specific events in the UI control in the program.
example (1), Register event: [btn addtarget:self action : @selector (onclickbtn:) forcontrolevents:uicontroleventtouchupinside
Example (2), deleting an event: [btn removetarget:self action:@selector(onclickbtn:) forcontrolevents:uicontroleventtouchupinside];
3. For some life cycle events of a UI control, you can delegate directly to the corresponding delegate object processing.
Description: For a specific UI control, such as: Uilable control, cannot be the above method,
At this point, the system provides an event delegation interface specifically for uilable.
The object that implements the delegate interface for the event will be responsible for handling the special events of the Uilable control.
Example: >>??
5. How is iOS event handled?