Link Search Menu Expand Document

GestureRecognizerDelegate

A set of methods implemented by the delegate of a gesture recognizer to fine-tune an application’s gesture-recognition behavior.

public protocol GestureRecognizerDelegate: AnyObject 

Inheritance

AnyObject

Default Implementations

gestureRecognizerShouldBegin(_:)

public func gestureRecognizerShouldBegin(_ gestureRecognizer: GestureRecognizer)
      -> Bool 

gestureRecognizer(_:shouldReceive:)

public func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, 
                                shouldReceive touch: Touch) -> Bool 

gestureRecognizer(_:shouldReceive:)

NOT_YET_IMPLEMENTED
``` swift public func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, shouldReceive press: Press) -> Bool ```

gestureRecognizer(_:shouldReceive:)

public func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, 
                                shouldReceive event: Event) -> Bool 

gestureRecognizer(_:shouldRecognizeSimultaneouslyWith:)

public func gestureRecognizer(_ gestureRecognizer: GestureRecognizer,
                                shouldRecognizeSimultaneouslyWith otherGestureRecognizer: GestureRecognizer)
      -> Bool 

gestureRecognizer(_:shouldRequireFailureOf:)

public func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, 
                                shouldRequireFailureOf otherGestureRecognizer: GestureRecognizer)
      -> Bool 

gestureRecognizer(_:shouldBeRequiredToFailBy:)

public func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, 
                                shouldBeRequiredToFailBy otherGestureRecognizer: GestureRecognizer)
      -> Bool 

Requirements

gestureRecognizerShouldBegin(_:​)

Asks the delegate if a gesture recognizer should begin interpreting touches.

func gestureRecognizerShouldBegin(_ gestureRecognizer: GestureRecognizer)
      -> Bool

gestureRecognizer(_:​shouldReceive:​)

Asks the delegate if a gesture recognizer should receive an object representing a touch.

func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, 
                         shouldReceive touch: Touch) -> Bool

gestureRecognizer(_:​shouldReceive:​)

NOT_YET_IMPLEMENTED
``` swift func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, shouldReceive press: Press) -> Bool ```

gestureRecognizer(_:​shouldReceive:​)

Asks the delegate if a gesture recognizer should receive an object representing a touch or press event.

func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, 
                         shouldReceive event: Event) -> Bool

gestureRecognizer(_:​shouldRecognizeSimultaneouslyWith:​)

Asks the delegate if two gesture recognizers should be allowed to recognize gestures simultaneously.

func gestureRecognizer(_ gestureRecognizer: GestureRecognizer,
                         shouldRecognizeSimultaneouslyWith otherGestureRecognizer: GestureRecognizer)
      -> Bool

gestureRecognizer(_:​shouldRequireFailureOf:​)

Asks the delegate if a gesture recognizer should require another gesture recognizer to fail.

func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, 
                         shouldRequireFailureOf otherGestureRecognizer: GestureRecognizer)
      -> Bool

gestureRecognizer(_:​shouldBeRequiredToFailBy:​)

Asks the delegate if a gesture recognizer should be required to fail by another gesture recognizer.

func gestureRecognizer(_ gestureRecognizer: GestureRecognizer, 
                         shouldBeRequiredToFailBy otherGestureRecognizer: GestureRecognizer)
      -> Bool