iOS responder Chain

Source: Internet
Author: User

The process of delivering a complete touch event with a delivery response

Uiappliction---UIWIONDW to find the most appropriate control for handling events

The control calls the touches method and determines whether the touches method is implemented, and no implementation defaults to passing the event to the previous responder--Finding the previous responder

1. Responder Chain:

A chain linked together by many responders is called the responder chain.

What is a responder: An object that inherits Uiresponder is called a responder object

2. The default approach is to pass the event up the responder chain, handing the event to the previous responder for processing

How can I tell who is the last responder of the current responder?

1. Determine whether the controller is currently a view, if the controller's view on the previous responder is the controller

2. If the view is not currently a controller, the previous responder is the parent control

3. What is the use of the responder chain?

Allows multiple responders to respond to the event at the same time as a touch event occurs

iOS responder Chain

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.