1.0 events in iOS and 1.0iOS

Source: Internet
Author: User

1.0 events in iOS and 1.0iOS

When a user uses an app, various events are generated. Events in iOS can be divided into three types: UIKit can recognize three types of input events:
  • Touch event
  • Accelerator event/motion event
  • Remote Control event
UIResponder-response object Concept:
In iOS, not all objects can process events. Only objects that inherit UIResponder can receive and process events.
Member:
UIApplication, UIViewController, and UIView are all inherited from UIResponder. Therefore, they are all responder objects that can receive and process events.
Internal method of UIResponder:
1 // touch event 2-(void) touchesBegan :( NSSet <UITouch *> *) touches withEvent :( nullable UIEvent *) event; 3-(void) touchesMoved :( NSSet <UITouch *> *) touches withEvent :( nullable UIEvent *) event; 4-(void) Events :( NSSet <UITouch *> *) touches withEvent :( nullable UIEvent *) event; 5-(void) touchesCancelled :( nullable NSSet <UITouch *> *) touches withEvent :( nullable UIEvent *) event; 6-(void) handle :( NSSet * _ Nonnull) touches NS_AVAILABLE_IOS (9_1 );
1 // accelerator event 2-(void) motionBegan :( UIEventSubtype) motion withEvent :( nullable UIEvent *) event NS_AVAILABLE_IOS (3_0); 3-(void) motionEnded :( UIEventSubtype) motion withEvent :( nullable UIEvent *) event failed (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 you have any questions, please send an e-mail to shorfng@126.com to contact me. By: Loto)

Related Article

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.