1. Transmission of touch events:
(1) Illustrate the transmission of the touch event as follows:
We triggered the touch event when we clicked on the button control inside sub View 02.
• This touch event is first passed to the top-level parent view, and the top-level parent view begins to traverse its own child view (parent view 01 and parent View 02 are child view of the top-level parent view).
Determine if the touch click event is on Parent view 01 or on Parent view 02 , and you know it is above parent view 02 .
• Parent View 02 Iterates over its child view (child view 01 and child View 02 are child views of parent View 02), judging that this touch click event is above sub view 02 .
• Sub View 02 determines that the touch click event is on the button by traversing its own child view again.
(2)
Custom controls (views) Phase 28 Note 10: Custom View Touch Events