IOS-entire process of event processing (Supplement)

Source: Internet
Author: User

IOS-entire process of event processing (Supplement)
Complete process of event processing 1> first pass the event object from top to bottom (the parent control is passed to the Child control) and find the most appropriate control to process the event. 2> call touches .... Method 3> If [super touches…] is called; The event will be passed up along the responder chain, passed to the previous responder 4> then the touches of the previous responder will be called .... Method to Determine the previous responder 1> if the current view is the Controller view, the controller is the previous responder 2> if the current view is not the Controller view, the parent control is the event Transfer Process of the previous responder chain. If the view Controller exists, it is passed to the Controller. If the Controller does not exist, the parent view passed to it is in the top-level view of the view hierarchy. If the received event or message cannot be processed, it will pass the event or message to the window object for processing. If the window object is not processed, it will pass the event or message to the UIApplication object. If the UIApplication cannot process the event or message, the method of discarding the responder touches is to pass the event along the response chain and send it to the last responder for processing. In the default method, the [super touches... withEvent...]; control must override the touches method to process events and implement responses when it responds to events. The principle of multi-control processing is that 1 is on the responder chain and is the parent control of its control 2 and the touches method is implemented.

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.