Creates a dependency relationship between the receiver and another gesture recognizer when the objects are created.
- iOS 3.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
Another gesture-recognizer object (an instance of a subclass of UIGestureRecognizer).
This method works fine when gesture recognizers aren’t created elsewhere in the app—or in a framework—and the set of gesture recognizers remains the same. If you need to set up failure requirements lazily or in different view hierarchies, use
gesture instead. (Note that the
should methods let subclasses define class-wide failure requirements.)
This method creates a relationship with another gesture recognizer that delays the receiver’s transition out of
UIGesture. The state that the receiver transitions to depends on what happens with
UIGesture, the receiver transitions to its normal next state.
Recognizer .State .failed
An example where this method might be called is when you want a single-tap gesture require that a double-tap gesture fail.