Event recognition
First Claim
1. A non-transitory computer readable storage medium storing software that includes a view hierarchy with a plurality of views and instructions for execution by one of more processors of an electronic device having a touch-sensitive display, the instructions for:
- at the electronic having the touch-sensitive display;
detecting one or more touches on the touch-sensitive display within a view that corresponds to a region of a user interface displayed on the touch-sensitive display;
obtaining a sequence of touch sub-events that correspond to one or more touches within the view;
providing the sequence of touch sub-events to a plurality of gesture recognizers that are associated with the view, including a first gesture recognizer and a second gesture recognizer; and
detecting a transition in state of the first gesture recognizer with respect to recognizing a gesture based on the sequence of touch sub-events; and
,in response to detecting the transition in state of the first gesture recognizer;
in accordance with a determination that the first gesture recognizer has transitioned to a state in which a gesture that corresponds to the sequence of touch sub-events has been recognized,transitioning the second gesture recognizer into a state in which the second gesture recognizer is prevented from recognizing a gesture that corresponds to the sequence of touch sub-events, andperforming an action corresponding to the gesture recognized by the first gesture recognizer in an application associated with the view.
0 Assignments
0 Petitions
Accused Products
Abstract
A method executes software including a view hierarchy with a plurality of views which displays one or more views of the view hierarchy. The method executes software elements associated with a particular view, wherein each particular view includes event recognizers. Each event recognizer has an event definition based on sub-events, and an event handler that specifies an action for a target, and is configured to send the action to the target in response to an event recognition. The method detects a sequence of sub-events, and identifies one of the views of the view hierarchy as a hit view that establishes which views in the hierarchy are actively involved views. The method delivers a respective sub-event to event recognizers for each actively involved view, wherein each event recognizer for actively involved views in the view hierarchy processes the respective sub-event prior to processing a next sub-event in the sequence of sub-events.
506 Citations
20 Claims
-
1. A non-transitory computer readable storage medium storing software that includes a view hierarchy with a plurality of views and instructions for execution by one of more processors of an electronic device having a touch-sensitive display, the instructions for:
at the electronic having the touch-sensitive display; detecting one or more touches on the touch-sensitive display within a view that corresponds to a region of a user interface displayed on the touch-sensitive display; obtaining a sequence of touch sub-events that correspond to one or more touches within the view; providing the sequence of touch sub-events to a plurality of gesture recognizers that are associated with the view, including a first gesture recognizer and a second gesture recognizer; and detecting a transition in state of the first gesture recognizer with respect to recognizing a gesture based on the sequence of touch sub-events; and
,in response to detecting the transition in state of the first gesture recognizer; in accordance with a determination that the first gesture recognizer has transitioned to a state in which a gesture that corresponds to the sequence of touch sub-events has been recognized, transitioning the second gesture recognizer into a state in which the second gesture recognizer is prevented from recognizing a gesture that corresponds to the sequence of touch sub-events, and performing an action corresponding to the gesture recognized by the first gesture recognizer in an application associated with the view. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
10. An electronic device, comprising:
-
a touch-sensitive display; one or more processors; and memory storing software that includes a view hierarchy with a plurality of views and instructions, which, when executed by the one or more processors, cause the electronic device to perform a method including; detecting one or more touches on the touch-sensitive display within a view that corresponds to a region of a user interface displayed on the touch-sensitive display; obtaining a sequence of touch sub-events that correspond to one or more touches within the view; providing the sequence of touch sub-events to a plurality of gesture recognizers that are associated with the view, including a first gesture recognizer and a second gesture recognizer; and detecting a transition in state of the first gesture recognizer with respect to recognizing a gesture based on the sequence of touch sub-events; and
,in response to detecting the transition in state of the first gesture recognizer; in accordance with a determination that the first gesture recognizer has transitioned to a state in which a gesture that corresponds to the sequence of touch sub-events has been recognized, transitioning the second gesture recognizer into a state in which the second gesture recognizer is prevented from recognizing a gesture that corresponds to the sequence of touch sub-events, and performing an action corresponding to the gesture recognized by the first gesture recognizer in an application associated with the view. - View Dependent Claims (11)
-
-
12. A method, comprising,
at a device with a touch-sensitive display: -
detecting one or more touches on the touch-sensitive display within a view that corresponds to a region of a user interface displayed on the touch-sensitive display; obtaining a sequence of touch sub-events that correspond to one or more touches within the view; providing the sequence of touch sub-events to a plurality of gesture recognizers that are associated with the view, including a first gesture recognizer and a second gesture recognizer; and detecting a transition in state of the first gesture recognizer with respect to recognizing a gesture based on the sequence of touch sub-events; and
,in response to detecting the transition in state of the first gesture recognizer; in accordance with a determination that the first gesture recognizer has transitioned to a state in which a gesture that corresponds to the sequence of touch sub-events has been recognized, transitioning the second gesture recognizer into a state in which the second gesture recognizer is prevented from recognizing a gesture that corresponds to the sequence of touch sub-events, and performing an action corresponding to the gesture recognized by the first gesture recognizer in an application associated with the view. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20)
-
Specification