Package apple.uikit
Class UIGestureRecognizer
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.uikit.UIGestureRecognizer
-
- All Implemented Interfaces:
NSObject
- Direct Known Subclasses:
UIHoverGestureRecognizer,UILongPressGestureRecognizer,UIPanGestureRecognizer,UIPinchGestureRecognizer,UIRotationGestureRecognizer,UISwipeGestureRecognizer,UITapGestureRecognizer
public class UIGestureRecognizer extends NSObject
API-Since: 3.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUIGestureRecognizer(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()voidaddTargetAction(@NotNull java.lang.Object target, @NotNull org.moe.natj.objc.SEL action)add a target/action pair.static UIGestureRecognizeralloc()static UIGestureRecognizerallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)@NotNull NSArray<? extends NSNumber>allowedPressTypes()Array of UIPressTypes as NSNumbers.@NotNull NSArray<? extends NSNumber>allowedTouchTypes()Array of UITouchTypes as NSNumbers.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)longbuttonMask()API-Since: 13.4booleancanBePreventedByGestureRecognizer(@NotNull UIGestureRecognizer preventingGestureRecognizer)static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)booleancancelsTouchesInView()default is YES.booleancanPreventGestureRecognizer(@NotNull UIGestureRecognizer preventedGestureRecognizer)same behavior as the equivalent delegate methods, but can be used by subclasses to define class-wide prevention rules for example, a UITapGestureRecognizer never prevents another UITapGestureRecognizer with a higher tap countstatic @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()booleandelaysTouchesBegan()default is NO.booleandelaysTouchesEnded()default is YES.@Nullable UIGestureRecognizerDelegatedelegate()the gesture recognizer's delegatestatic java.lang.Stringdescription_static()static longhash_static()voidignorePressForEvent(@NotNull UIPress button, @NotNull UIPressesEvent event)API-Since: 9.0voidignoreTouchForEvent(@NotNull UITouch touch, @NotNull UIEvent event)if a touch isn't part of this gesture it can be passed to this method to be ignored.UIGestureRecognizerinit()UIGestureRecognizerinitWithCoder(@NotNull NSCoder coder)UIGestureRecognizerinitWithTargetAction(@Nullable java.lang.Object target, @Nullable org.moe.natj.objc.SEL action)designated initializerstatic NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisEnabled()default is YES.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)CGPointlocationInView(@Nullable UIView view)a generic single-point location for the gesture.CGPointlocationOfTouchInView(long touchIndex, @Nullable UIView view)the location of a particular touchlongmodifierFlags()Values from the last event processed.@Nullable java.lang.Stringname()name for debugging to appear in logging API-Since: 11.0static UIGestureRecognizernew_objc()longnumberOfTouches()number of touches involved for which locations can be queriedvoidpressesBeganWithEvent(@NotNull NSSet<? extends UIPress> presses, @NotNull UIPressesEvent event)API-Since: 9.0voidpressesCancelledWithEvent(@NotNull NSSet<? extends UIPress> presses, @NotNull UIPressesEvent event)API-Since: 9.0voidpressesChangedWithEvent(@NotNull NSSet<? extends UIPress> presses, @NotNull UIPressesEvent event)API-Since: 9.0voidpressesEndedWithEvent(@NotNull NSSet<? extends UIPress> presses, @NotNull UIPressesEvent event)API-Since: 9.0voidremoveTargetAction(@Nullable java.lang.Object target, @Nullable org.moe.natj.objc.SEL action)remove the specified target/action pair.voidrequireGestureRecognizerToFail(@NotNull UIGestureRecognizer otherGestureRecognizer)create a relationship with another gesture recognizer that will prevent this gesture's actions from being called until otherGestureRecognizer transitions to UIGestureRecognizerStateFailed if otherGestureRecognizer transitions to UIGestureRecognizerStateRecognized or UIGestureRecognizerStateBegan then this recognizer will instead transition to UIGestureRecognizerStateFailed example usage: a single tap may require a double tap to failbooleanrequiresExclusiveTouchType()defaults to YES API-Since: 9.2voidreset()called automatically by the runtime after the gesture state has been set to UIGestureRecognizerStateEnded any internal state should be reset to prepare for a new attempt to recognize the gesture after this is received all remaining active touches will be ignored (no further updates will be received for touches that had already begun but haven't ended)static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetAllowedPressTypes(@NotNull NSArray<? extends NSNumber> value)Array of UIPressTypes as NSNumbers.voidsetAllowedTouchTypes(@NotNull NSArray<? extends NSNumber> value)Array of UITouchTypes as NSNumbers.voidsetCancelsTouchesInView(boolean value)default is YES.voidsetDelaysTouchesBegan(boolean value)default is NO.voidsetDelaysTouchesEnded(boolean value)default is YES.voidsetDelegate(@Nullable UIGestureRecognizerDelegate value)the gesture recognizer's delegatevoidsetDelegate_unsafe(@Nullable UIGestureRecognizerDelegate value)the gesture recognizer's delegatevoidsetEnabled(boolean value)default is YES.voidsetName(@Nullable java.lang.String value)name for debugging to appear in logging API-Since: 11.0voidsetRequiresExclusiveTouchType(boolean value)defaults to YES API-Since: 9.2voidsetState(long value)the current state of the gesture recognizer.static voidsetVersion_static(long aVersion)booleanshouldBeRequiredToFailByGestureRecognizer(@NotNull UIGestureRecognizer otherGestureRecognizer)API-Since: 7.0booleanshouldReceiveEvent(@NotNull UIEvent event)same behavior as the equivalent delegate method API-Since: 13.4booleanshouldRequireFailureOfGestureRecognizer(@NotNull UIGestureRecognizer otherGestureRecognizer)same behavior as the equivalent delegate methods, but can be used by subclasses to define class-wide failure requirements API-Since: 7.0longstate()the current state of the gesture recognizerstatic org.moe.natj.objc.Classsuperclass_static()voidtouchesBeganWithEvent(@NotNull NSSet<? extends UITouch> touches, @NotNull UIEvent event)mirror of the touch-delivery methods on UIResponder UIGestureRecognizers aren't in the responder chain, but observe touches hit-tested to their view and their view's subviews UIGestureRecognizers receive touches before the view to which the touch was hit-testedvoidtouchesCancelledWithEvent(@NotNull NSSet<? extends UITouch> touches, @NotNull UIEvent event)voidtouchesEndedWithEvent(@NotNull NSSet<? extends UITouch> touches, @NotNull UIEvent event)voidtouchesEstimatedPropertiesUpdated(@NotNull NSSet<? extends UITouch> touches)API-Since: 9.1voidtouchesMovedWithEvent(@NotNull NSSet<? extends UITouch> touches, @NotNull UIEvent event)static booleanuseStoredAccessor()Deprecated.static longversion_static()@Nullable UIViewview()the view the gesture is attached to.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static UIGestureRecognizer alloc()
-
allocWithZone
public static UIGestureRecognizer allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static UIGestureRecognizer new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
addTargetAction
public void addTargetAction(@NotNull @NotNull java.lang.Object target, @NotNull @NotNull org.moe.natj.objc.SEL action)add a target/action pair. you can call this multiple times to specify multiple target/actions
-
allowedPressTypes
@NotNull public @NotNull NSArray<? extends NSNumber> allowedPressTypes()
Array of UIPressTypes as NSNumbers. The default value is platform dependent. API-Since: 9.0
-
allowedTouchTypes
@NotNull public @NotNull NSArray<? extends NSNumber> allowedTouchTypes()
Array of UITouchTypes as NSNumbers. The default value is platform dependent. API-Since: 9.0
-
cancelsTouchesInView
public boolean cancelsTouchesInView()
default is YES. causes touchesCancelled:withEvent: or pressesCancelled:withEvent: to be sent to the view for all touches or presses recognized as part of this gesture immediately before the action method is called.
-
delaysTouchesBegan
public boolean delaysTouchesBegan()
default is NO. causes all touch or press events to be delivered to the target view only after this gesture has failed recognition. set to YES to prevent views from processing any touches or presses that may be recognized as part of this gesture
-
delaysTouchesEnded
public boolean delaysTouchesEnded()
default is YES. causes touchesEnded or pressesEnded events to be delivered to the target view only after this gesture has failed recognition. this ensures that a touch or press that is part of the gesture can be cancelled if the gesture is recognized
-
delegate
@Nullable public @Nullable UIGestureRecognizerDelegate delegate()
the gesture recognizer's delegate
-
init
public UIGestureRecognizer init()
-
initWithTargetAction
public UIGestureRecognizer initWithTargetAction(@Nullable @Nullable java.lang.Object target, @Nullable @Nullable org.moe.natj.objc.SEL action)
designated initializer
-
isEnabled
public boolean isEnabled()
default is YES. disabled gesture recognizers will not receive touches. when changed to NO the gesture recognizer will be cancelled if it's currently recognizing a gesture
-
setEnabled
public void setEnabled(boolean value)
default is YES. disabled gesture recognizers will not receive touches. when changed to NO the gesture recognizer will be cancelled if it's currently recognizing a gesture
-
locationInView
public CGPoint locationInView(@Nullable @Nullable UIView view)
a generic single-point location for the gesture. usually the centroid of the touches involved
-
locationOfTouchInView
public CGPoint locationOfTouchInView(long touchIndex, @Nullable @Nullable UIView view)
the location of a particular touch
-
numberOfTouches
public long numberOfTouches()
number of touches involved for which locations can be queried
-
removeTargetAction
public void removeTargetAction(@Nullable @Nullable java.lang.Object target, @Nullable @Nullable org.moe.natj.objc.SEL action)remove the specified target/action pair. passing nil for target matches all targets, and the same for actions
-
requireGestureRecognizerToFail
public void requireGestureRecognizerToFail(@NotNull @NotNull UIGestureRecognizer otherGestureRecognizer)create a relationship with another gesture recognizer that will prevent this gesture's actions from being called until otherGestureRecognizer transitions to UIGestureRecognizerStateFailed if otherGestureRecognizer transitions to UIGestureRecognizerStateRecognized or UIGestureRecognizerStateBegan then this recognizer will instead transition to UIGestureRecognizerStateFailed example usage: a single tap may require a double tap to fail
-
requiresExclusiveTouchType
public boolean requiresExclusiveTouchType()
defaults to YES API-Since: 9.2
-
setAllowedPressTypes
public void setAllowedPressTypes(@NotNull @NotNull NSArray<? extends NSNumber> value)Array of UIPressTypes as NSNumbers. The default value is platform dependent. API-Since: 9.0
-
setAllowedTouchTypes
public void setAllowedTouchTypes(@NotNull @NotNull NSArray<? extends NSNumber> value)Array of UITouchTypes as NSNumbers. The default value is platform dependent. API-Since: 9.0
-
setCancelsTouchesInView
public void setCancelsTouchesInView(boolean value)
default is YES. causes touchesCancelled:withEvent: or pressesCancelled:withEvent: to be sent to the view for all touches or presses recognized as part of this gesture immediately before the action method is called.
-
setDelaysTouchesBegan
public void setDelaysTouchesBegan(boolean value)
default is NO. causes all touch or press events to be delivered to the target view only after this gesture has failed recognition. set to YES to prevent views from processing any touches or presses that may be recognized as part of this gesture
-
setDelaysTouchesEnded
public void setDelaysTouchesEnded(boolean value)
default is YES. causes touchesEnded or pressesEnded events to be delivered to the target view only after this gesture has failed recognition. this ensures that a touch or press that is part of the gesture can be cancelled if the gesture is recognized
-
setDelegate_unsafe
public void setDelegate_unsafe(@Nullable @Nullable UIGestureRecognizerDelegate value)the gesture recognizer's delegate
-
setDelegate
public void setDelegate(@Nullable @Nullable UIGestureRecognizerDelegate value)the gesture recognizer's delegate
-
setRequiresExclusiveTouchType
public void setRequiresExclusiveTouchType(boolean value)
defaults to YES API-Since: 9.2
-
state
public long state()
the current state of the gesture recognizer
-
view
@Nullable public @Nullable UIView view()
the view the gesture is attached to. set by adding the recognizer to a UIView using the addGestureRecognizer: method
-
name
@Nullable public @Nullable java.lang.String name()
name for debugging to appear in logging API-Since: 11.0
-
setName
public void setName(@Nullable @Nullable java.lang.String value)name for debugging to appear in logging API-Since: 11.0
-
canBePreventedByGestureRecognizer
public boolean canBePreventedByGestureRecognizer(@NotNull @NotNull UIGestureRecognizer preventingGestureRecognizer)
-
canPreventGestureRecognizer
public boolean canPreventGestureRecognizer(@NotNull @NotNull UIGestureRecognizer preventedGestureRecognizer)same behavior as the equivalent delegate methods, but can be used by subclasses to define class-wide prevention rules for example, a UITapGestureRecognizer never prevents another UITapGestureRecognizer with a higher tap count
-
ignorePressForEvent
public void ignorePressForEvent(@NotNull @NotNull UIPress button, @NotNull @NotNull UIPressesEvent event)API-Since: 9.0
-
ignoreTouchForEvent
public void ignoreTouchForEvent(@NotNull @NotNull UITouch touch, @NotNull @NotNull UIEvent event)if a touch isn't part of this gesture it can be passed to this method to be ignored. ignored touches won't be cancelled on the view even if cancelsTouchesInView is YES
-
initWithCoder
public UIGestureRecognizer initWithCoder(@NotNull @NotNull NSCoder coder)
-
pressesBeganWithEvent
public void pressesBeganWithEvent(@NotNull @NotNull NSSet<? extends UIPress> presses, @NotNull @NotNull UIPressesEvent event)API-Since: 9.0
-
pressesCancelledWithEvent
public void pressesCancelledWithEvent(@NotNull @NotNull NSSet<? extends UIPress> presses, @NotNull @NotNull UIPressesEvent event)API-Since: 9.0
-
pressesChangedWithEvent
public void pressesChangedWithEvent(@NotNull @NotNull NSSet<? extends UIPress> presses, @NotNull @NotNull UIPressesEvent event)API-Since: 9.0
-
pressesEndedWithEvent
public void pressesEndedWithEvent(@NotNull @NotNull NSSet<? extends UIPress> presses, @NotNull @NotNull UIPressesEvent event)API-Since: 9.0
-
reset
public void reset()
called automatically by the runtime after the gesture state has been set to UIGestureRecognizerStateEnded any internal state should be reset to prepare for a new attempt to recognize the gesture after this is received all remaining active touches will be ignored (no further updates will be received for touches that had already begun but haven't ended)
-
setState
public void setState(long value)
the current state of the gesture recognizer. can only be set by subclasses of UIGestureRecognizer, but can be read by consumers
-
shouldBeRequiredToFailByGestureRecognizer
public boolean shouldBeRequiredToFailByGestureRecognizer(@NotNull @NotNull UIGestureRecognizer otherGestureRecognizer)API-Since: 7.0
-
shouldRequireFailureOfGestureRecognizer
public boolean shouldRequireFailureOfGestureRecognizer(@NotNull @NotNull UIGestureRecognizer otherGestureRecognizer)same behavior as the equivalent delegate methods, but can be used by subclasses to define class-wide failure requirements API-Since: 7.0
-
touchesBeganWithEvent
public void touchesBeganWithEvent(@NotNull @NotNull NSSet<? extends UITouch> touches, @NotNull @NotNull UIEvent event)mirror of the touch-delivery methods on UIResponder UIGestureRecognizers aren't in the responder chain, but observe touches hit-tested to their view and their view's subviews UIGestureRecognizers receive touches before the view to which the touch was hit-tested
-
touchesCancelledWithEvent
public void touchesCancelledWithEvent(@NotNull @NotNull NSSet<? extends UITouch> touches, @NotNull @NotNull UIEvent event)
-
touchesEndedWithEvent
public void touchesEndedWithEvent(@NotNull @NotNull NSSet<? extends UITouch> touches, @NotNull @NotNull UIEvent event)
-
touchesEstimatedPropertiesUpdated
public void touchesEstimatedPropertiesUpdated(@NotNull @NotNull NSSet<? extends UITouch> touches)API-Since: 9.1
-
touchesMovedWithEvent
public void touchesMovedWithEvent(@NotNull @NotNull NSSet<? extends UITouch> touches, @NotNull @NotNull UIEvent event)
-
buttonMask
public long buttonMask()
API-Since: 13.4
-
modifierFlags
public long modifierFlags()
Values from the last event processed. These values are not considered as requirements for the gesture. API-Since: 13.4
-
shouldReceiveEvent
public boolean shouldReceiveEvent(@NotNull @NotNull UIEvent event)same behavior as the equivalent delegate method API-Since: 13.4
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-