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