1.0 Events in iOS

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.