主权项 |
1. A method comprising:
by a computing device, receiving a touch input within a particular region of a display area of the computing device, the display area presenting a user interface (UI) comprising a plurality of views and an outside view, each of the views corresponding to one or more regions of the display area, one or more of the views having a gesture recognizer configured to process a touch input detected within the regions of the display area associated with each of the views, the outside view having a gesture recognizer configured to process the touch input detected within the display area, the views being organized in a hierarchy; by the computing device, determining whether a particular one of the views from among the plurality of views is set as a modal view; by the computing device, retargeting the gesture recognizer associated with the particular view to the gesture recognizer associated with the outside view in response to determining the particular view is set as the modal view; by the computing device, preventing the gesture recognizers of one or more non-modal views from processing the touch input within the particular region in response to a presence of the modal view; and by the computing device, processing the touch input within the particular region through the gesture recognizer associated with the modal view in response to the presence of the modal view. |