Unable to respond interactively after the iOS child view has exceeded the parent view frame

Source: Internet
Author: User

Determine the first responder

When a user triggers an event (Touch event or Motion event), Uikit creates an event object (Uievent) that contains some information that is required to handle the event. The event object is then placed in an event queue. These events are processed in FIFO order. When an event is processed, the program's UIApplication object takes an event object out of the queue's head and distributes it. Usually the first is to distribute the event to the main window object of the program, and for touch events, the Window object first attempts to distribute the event to the view on which the touch event occurred. This view is often referred to as the Hit-test view, and the process of finding this view is called hit-testing.

The system uses hit-testing to find the view under touch, which detects whether a touch event occurs within the bounds of the corresponding view object (that is, the frame property of the view, which is why the child view cannot respond to the event if it is outside the frame of the parent view). if it is, it will recursively detect all of its child views. The bottom-most view in a view hierarchy that contains touch points is the hit-test view. After the Hit-test view is detected, the system sends the event to this view for processing.

Unable to respond interactively after the iOS child view has exceeded the parent view frame

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.