There are a variety of events that occur during the user's use of the app, and the events in iOS can be divided into 3 major types: Uikit recognizes three types of input events:
- Touch events
- Accelerometer Event/Motion Event
- Remote control Events
|
Uiresponder-Responder Object Concept:
| Not all objects in iOS can handle events, only objects that inherit Uiresponder can receive and handle events. |
Members:
| UIApplication, Uiviewcontroller, and UIView inherit from Uiresponder, so they are both responder objects that can receive and handle events |
Internal methods of Uiresponder:
1 //Touch Events2- (void) Touchesbegan: (Nsset<uitouch *> *) touches withevent: (Nullable uievent *)Event;3- (void) touchesmoved: (Nsset<uitouch *> *) touches withevent: (Nullable uievent *)Event;4- (void) touchesended: (Nsset<uitouch *> *) touches withevent: (Nullable uievent *)Event;5- (void) touchescancelled: (Nullable nsset<uitouch *> *) touches withevent: (Nullable uievent *)Event;6- (void) touchesestimatedpropertiesupdated: (Nsset * _nonnull) touches Ns_available_ios (9_1);
1 // 2 -(void ) Motionbegan: ( Uieventsubtype) Motion withevent: (Nullable uievent *) event Ns_available_ios (3_0); 3 -(void ) motionended: (Uieventsubtype) Motion withevent: (Nullable uievent *) event Ns_ Available_ios (3_0); 4 -(void ) motioncancelled: ( Uieventsubtype) Motion withevent: (Nullable uievent *) event Ns_available_ios (3_ 0);
// Remote Control Event -(void) Remotecontrolreceivedwithevent: (Nullable uievent *) event Ns_available_ios (4_0);
If in doubt, please send an email to [email protected] contact me. by : Lantian (Loto)
1.0 Events in iOS