Package apple.uikit

Class UIGestureRecognizer

    • Constructor Detail

      • UIGestureRecognizer

        protected UIGestureRecognizer​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • 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()
      • 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)
      • 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
      • 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
      • 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
      • 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.