UIGestureRecognizer
extension UIGestureRecognizer
-
Equivalent to implementing UIGestureRecognizerDelegate’s gestureRecognizerShouldBegin(:) method
Declaration
Swift
@discardableResult public func shouldBegin(handler: @escaping () -> Bool) -> SelfParameters
handlerThe closure that will be called in place of its equivalent delegate method
Return Value
itself so you can daisy chain the other delegate calls
-
Equivalent to implementing UIGestureRecognizerDelegate’s gestureRecognizer(:shouldRecognizeSimultaneouslyWith:) method
Declaration
Swift
@discardableResult public func shouldRecognizeSimultaneouslyWith(handler: @escaping (_ otherGestureRecognizer: UIGestureRecognizer) -> Bool) -> SelfParameters
handlerThe closure that will be called in place of its equivalent delegate method
Return Value
itself so you can daisy chain the other delegate calls
-
Equivalent to implementing UIGestureRecognizerDelegate’s gestureRecognizer(:shouldRequireFailureOf:) method
Declaration
Swift
@discardableResult public func shouldRequireFailureOf(handler: @escaping (_ otherGestureRecognizer: UIGestureRecognizer) -> Bool) -> SelfParameters
handlerThe closure that will be called in place of its equivalent delegate method
Return Value
itself so you can daisy chain the other delegate calls
-
Equivalent to implementing UIGestureRecognizerDelegate’s gestureRecognizer(:shouldBeRequiredToFailBy:) method
Declaration
Swift
@discardableResult public func shouldBeRequiredToFailBy(handler: @escaping (_ otherGestureRecognizer: UIGestureRecognizer) -> Bool) -> SelfParameters
handlerThe closure that will be called in place of its equivalent delegate method
Return Value
itself so you can daisy chain the other delegate calls
-
Equivalent to implementing UIGestureRecognizerDelegate’s gestureRecognizer(:shouldReceive:) method
Declaration
Swift
@discardableResult public func shouldReceiveTouch(handler: @escaping (_ touch: UITouch) -> Bool) -> SelfParameters
handlerThe closure that will be called in place of its equivalent delegate method
Return Value
itself so you can daisy chain the other delegate calls
-
Equivalent to implementing UIGestureRecognizerDelegate’s gestureRecognizer(:shouldReceive:) method
Declaration
Swift
@discardableResult public func shouldReceivePress(handler: @escaping (_ press: UIPress) -> Bool) -> SelfParameters
handlerThe closure that will be called in place of its equivalent delegate method
Return Value
itself so you can daisy chain the other delegate calls
-
Clears any delegate closures that were assigned to this
UIGestureRecognizer. This cleans up memory as well as sets the delegate property to nil. This is typically only used for explicit cleanup. You are not required to call this method.Declaration
Swift
@objc public func clearClosureDelegates()
View on GitHub
UIGestureRecognizer Extension Reference