IOS. UI advanced. UITouch touch and UIGesture gesture. 02. responder object, responder chain, ios. uiuigesture

Source: Internet
Author: User

IOS. UI advanced. UITouch touch and UIGesture gesture. 02. responder object, responder chain, ios. uiuigesture

Target audience:

The responder object is an object that can receive and process events. UIResponser is the base class of all the response objects. This base class defines a series of programming interfaces, which not only serves event processing, but also provides general response behavior processing. UIApplication, UIView (including UIWindow), and UIViewController both inherit from UIResponser directly or indirectly. All the instances of these classes are responder objects.

That is to say, UIAppliaction, UIView, and UIViewController are all some programming interfaces through which event response and processing are implemented.

 

Responder chain:

The responder chain represents a series of responder objects. The event is handled by the first responder object. If the first responder does not process the event, it is passed up along the responder chain and handed over to the next responder ).

 

The process of transmitting the event responder chain:

The process from the Controller to the window explains why a Root View Controller needs to be set for each window.

 

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.