One Logo Pool Ball
UIKit · IOS API REFERENCE

UIGestureRecognizer

class · iOS 3.2+ · SDK 27.1

@MainActor class UIGestureRecognizer

Members (46)

method

canBePrevented

TypeScript
canBePrevented(preventingGestureRecognizer: UIGestureRecognizer): Promise<boolean>
Swift declaration
func canBePrevented(by preventingGestureRecognizer: UIGestureRecognizer) -> Bool
method

canPrevent

TypeScript
canPrevent(preventedGestureRecognizer: UIGestureRecognizer): Promise<boolean>
Swift declaration
func canPrevent(_ preventedGestureRecognizer: UIGestureRecognizer) -> Bool
method · iOS 9.0+

ignore

TypeScript
ignoreFor(button: UIPress, event: UIPressesEvent): Promise<void>
Swift declaration
@MainActor func ignore(_ button: UIPress, for event: UIPressesEvent)
method

ignore

TypeScript
ignoreFor46411(touch: UITouch, event: UIEvent): Promise<void>
Swift declaration
@MainActor func ignore(_ touch: UITouch, for event: UIEvent)
init · iOS 3.2+

init

TypeScript
static init(): Promise<UIGestureRecognizer>
Swift declaration
convenience init()
init · iOS 3.2+

init

TypeScript
static initCoder(coder: _Foundation_NSCoder): Promise<(UIGestureRecognizer) | null>
Swift declaration
convenience init?(coder: NSCoder)
method · iOS 3.2+

location

TypeScript
locationIn(view?: (UIView) | null): Promise<{ x: number; y: number }>
Swift declaration
func location(in view: UIView?) -> CGPoint
method · iOS 3.2+

location

TypeScript
locationOfTouchIn(touchIndex: number, view?: (UIView) | null): Promise<{ x: number; y: number }>
Swift declaration
func location(ofTouch touchIndex: Int, in view: UIView?) -> CGPoint
method · iOS 9.0+

pressesBegan

TypeScript
pressesBegan(presses: Array<UIPress>, event: UIPressesEvent): Promise<void>
Swift declaration
func pressesBegan(_ presses: Set<UIPress>, with event: UIPressesEvent)
method · iOS 9.0+

pressesCancelled

TypeScript
pressesCancelled(presses: Array<UIPress>, event: UIPressesEvent): Promise<void>
Swift declaration
func pressesCancelled(_ presses: Set<UIPress>, with event: UIPressesEvent)
method · iOS 9.0+

pressesChanged

TypeScript
pressesChanged(presses: Array<UIPress>, event: UIPressesEvent): Promise<void>
Swift declaration
func pressesChanged(_ presses: Set<UIPress>, with event: UIPressesEvent)
method · iOS 9.0+

pressesEnded

TypeScript
pressesEnded(presses: Array<UIPress>, event: UIPressesEvent): Promise<void>
Swift declaration
func pressesEnded(_ presses: Set<UIPress>, with event: UIPressesEvent)
method · iOS 3.2+

require

TypeScript
require(otherGestureRecognizer: UIGestureRecognizer): Promise<void>
Swift declaration
func require(toFail otherGestureRecognizer: UIGestureRecognizer)
method

reset

TypeScript
reset(): Promise<void>
Swift declaration
func reset()
method · iOS 7.0+

shouldBeRequiredToFail

TypeScript
shouldBeRequiredToFail(otherGestureRecognizer: UIGestureRecognizer): Promise<boolean>
Swift declaration
func shouldBeRequiredToFail(by otherGestureRecognizer: UIGestureRecognizer) -> Bool
method · iOS 13.4+

shouldReceive

TypeScript
shouldReceive(event: UIEvent): Promise<boolean>
Swift declaration
func shouldReceive(_ event: UIEvent) -> Bool
method · iOS 7.0+

shouldRequireFailure

TypeScript
shouldRequireFailure(otherGestureRecognizer: UIGestureRecognizer): Promise<boolean>
Swift declaration
func shouldRequireFailure(of otherGestureRecognizer: UIGestureRecognizer) -> Bool
method

touchesBegan

TypeScript
touchesBegan(touches: Array<UITouch>, event: UIEvent): Promise<void>
Swift declaration
func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent)
method

touchesCancelled

TypeScript
touchesCancelled(touches: Array<UITouch>, event: UIEvent): Promise<void>
Swift declaration
func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent)
method

touchesEnded

TypeScript
touchesEnded(touches: Array<UITouch>, event: UIEvent): Promise<void>
Swift declaration
func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent)
method · iOS 9.1+

touchesEstimatedPropertiesUpdated

TypeScript
touchesEstimatedPropertiesUpdated(touches: Array<UITouch>): Promise<void>
Swift declaration
func touchesEstimatedPropertiesUpdated(_ touches: Set<UITouch>)
method

touchesMoved

TypeScript
touchesMoved(touches: Array<UITouch>, event: UIEvent): Promise<void>
Swift declaration
func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent)
get · iOS 9.0+

allowedPressTypes

TypeScript
get allowedPressTypes(): Promise<Array<_Foundation_NSNumber>>
Swift declaration
var allowedPressTypes: [NSNumber] { get set }
set · iOS 9.0+

allowedPressTypes

TypeScript
setAllowedPressTypes(value: Array<_Foundation_NSNumber>): Promise<void>
Swift declaration
var allowedPressTypes: [NSNumber] { get set }
get · iOS 9.0+

allowedTouchTypes

TypeScript
get allowedTouchTypes(): Promise<Array<_Foundation_NSNumber>>
Swift declaration
var allowedTouchTypes: [NSNumber] { get set }
set · iOS 9.0+

allowedTouchTypes

TypeScript
setAllowedTouchTypes(value: Array<_Foundation_NSNumber>): Promise<void>
Swift declaration
var allowedTouchTypes: [NSNumber] { get set }
get · iOS 13.4+

buttonMask

TypeScript
get buttonMask(): Promise<UIEvent_ButtonMask>
Swift declaration
var buttonMask: UIEvent.ButtonMask { get }
get · iOS 3.2+

cancelsTouchesInView

TypeScript
get cancelsTouchesInView(): Promise<boolean>
Swift declaration
var cancelsTouchesInView: Bool { get set }
set · iOS 3.2+

cancelsTouchesInView

TypeScript
setCancelsTouchesInView(value: boolean): Promise<void>
Swift declaration
var cancelsTouchesInView: Bool { get set }
get · iOS 3.2+

delaysTouchesBegan

TypeScript
get delaysTouchesBegan(): Promise<boolean>
Swift declaration
var delaysTouchesBegan: Bool { get set }
set · iOS 3.2+

delaysTouchesBegan

TypeScript
setDelaysTouchesBegan(value: boolean): Promise<void>
Swift declaration
var delaysTouchesBegan: Bool { get set }
get · iOS 3.2+

delaysTouchesEnded

TypeScript
get delaysTouchesEnded(): Promise<boolean>
Swift declaration
var delaysTouchesEnded: Bool { get set }
set · iOS 3.2+

delaysTouchesEnded

TypeScript
setDelaysTouchesEnded(value: boolean): Promise<void>
Swift declaration
var delaysTouchesEnded: Bool { get set }
get · iOS 3.2+

delegate

TypeScript
get delegate(): Promise<(SDKHandle) | null>
Swift declaration
weak var delegate: (any UIGestureRecognizerDelegate)? { get set }
set · iOS 3.2+

delegate

TypeScript
setDelegate(value?: (Implements<UIGestureRecognizerDelegate> | SDKHandle) | null): Promise<void>
Swift declaration
weak var delegate: (any UIGestureRecognizerDelegate)? { get set }
get · iOS 3.2+

isEnabled

TypeScript
get isEnabled(): Promise<boolean>
Swift declaration
var isEnabled: Bool { get set }
set · iOS 3.2+

isEnabled

TypeScript
setIsEnabled(value: boolean): Promise<void>
Swift declaration
var isEnabled: Bool { get set }
get · iOS 13.4+

modifierFlags

TypeScript
get modifierFlags(): Promise<UIKeyModifierFlags>
Swift declaration
var modifierFlags: UIKeyModifierFlags { get }
get · iOS 11.0+

name

TypeScript
get name(): Promise<(string) | null>
Swift declaration
var name: String? { get set }
set · iOS 11.0+

name

TypeScript
setName(value?: (string) | null): Promise<void>
Swift declaration
var name: String? { get set }
get · iOS 3.2+

numberOfTouches

TypeScript
get numberOfTouches(): Promise<number>
Swift declaration
var numberOfTouches: Int { get }
get · iOS 9.2+

requiresExclusiveTouchType

TypeScript
get requiresExclusiveTouchType(): Promise<boolean>
Swift declaration
var requiresExclusiveTouchType: Bool { get set }
set · iOS 9.2+

requiresExclusiveTouchType

TypeScript
setRequiresExclusiveTouchType(value: boolean): Promise<void>
Swift declaration
var requiresExclusiveTouchType: Bool { get set }
get · iOS 3.2+

state

TypeScript
get state(): Promise<UIGestureRecognizer_State>
Swift declaration
var state: UIGestureRecognizer.State { get set }
set · iOS 3.2+

state

TypeScript
setState(value: UIGestureRecognizer_State): Promise<void>
Swift declaration
var state: UIGestureRecognizer.State { get set }
get · iOS 3.2+

view

TypeScript
get view(): Promise<(UIView) | null>
Swift declaration
var view: UIView? { get }

Skipped declarations

3 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UIGestureRecognizer.init(target:action:)

Objective-C selectors cannot cross the bridge.

UIGestureRecognizer.addTarget(_:action:)

Objective-C selectors cannot cross the bridge.

UIGestureRecognizer.removeTarget(_:action:)

Objective-C selectors cannot cross the bridge.

All UIKit types →