public class UISwipeGestureRecognizer extends UIGestureRecognizer
| Constructor and Description |
|---|
UISwipeGestureRecognizer(NSSelector<UIGestureRecognizer> target)
Constructs a UISwipeGestureRecognizer and associates it with the
specified target.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBePreventedByGestureRecognizer(UIGestureRecognizer preventing)
Override this method so that the specified UIGestureRecognizer prevents
this UIGestureRecognizer from recognizing a gesture.
|
boolean |
canPreventGestureRecognizer(UIGestureRecognizer preventing)
Override this method so that this UIGestureRecognizer prevents the
specified UIGestureRecognizer from recognizing a gesture.
|
int |
direction()
Returns the acceptable recognized direction of the swipe.
|
int |
numberOfTouchesRequired()
Returns the threshold of the number of touches for the gesture.
|
void |
setDirection(int direction)
Sets the acceptable recognized direction of the swipe.The default
direction is right.
|
void |
setNumberOfTouchesRequired(int numberOfTouchesRequired)
Sets the threshold of the number of touches required to recognize this
gesture.
|
void |
touchesBegan(Set<UITouch> touches,
UIEvent event)
Informs this UIGestureRecognizer when one or more fingers touched down in
the associated UIView.
|
void |
touchesCancelled(Set<UITouch> touches,
UIEvent event)
Informs this UIGestureRecognizer that a touch event was canceled due to
system event.
|
void |
touchesEnded(Set<UITouch> touches,
UIEvent event)
Informs this UIGestureRecognizer when one or more fingers were lifted
from the associated view.
|
void |
touchesMoved(Set<UITouch> touches,
UIEvent event)
Informs this UIGestureRecognizer when one or more fingers were moved
within the associated view.
|
addTarget, cancelsTouchesInView, delaysTouchesBegan, delaysTouchesEnded, delegate, isEnabled, locationInView, locationOfTouch, numberOfTouches, removeTarget, requireGestureRecognizerToFail, reset, setCancelsTouchesInView, setDelaysTouchesBegan, setDelaysTouchesEnded, setDelegate, setEnabled, state, toString, viewaddObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKeypublic UISwipeGestureRecognizer(NSSelector<UIGestureRecognizer> target)
target - The target of the new UISwipeGestureRecognizer.public int numberOfTouchesRequired()
public void setNumberOfTouchesRequired(int numberOfTouchesRequired)
numberOfTouchesRequired - The threshold of the number of touches for
the gesture.public int direction()
UISwipeGestureRecognizerDirectionpublic void setDirection(int direction)
direction - The direction of the swipe.UISwipeGestureRecognizerDirectionpublic void touchesBegan(Set<UITouch> touches, UIEvent event)
UIGestureRecognizertouchesBegan in class UIGestureRecognizertouches - The set of touches until the UITouchPhaseCancelled phase.event - The event to which the touches belong.public void touchesMoved(Set<UITouch> touches, UIEvent event)
UIGestureRecognizertouchesMoved in class UIGestureRecognizertouches - The set of touches until the UITouchPhaseCancelled phase.event - The event to which the touches belong.public void touchesEnded(Set<UITouch> touches, UIEvent event)
UIGestureRecognizertouchesEnded in class UIGestureRecognizertouches - The set of touches until the UITouchPhaseCancelled phase.event - The event to which the touches belong.public void touchesCancelled(Set<UITouch> touches, UIEvent event)
UIGestureRecognizertouchesCancelled in class UIGestureRecognizertouches - The set of touches until the UITouchPhaseCancelled phase.event - The event to which the touches belong.public boolean canBePreventedByGestureRecognizer(UIGestureRecognizer preventing)
UIGestureRecognizercanBePreventedByGestureRecognizer in class UIGestureRecognizerpreventing - The UIGestureRecognizer that prevents this gesture
recognizer from recognizing a gesture.public boolean canPreventGestureRecognizer(UIGestureRecognizer preventing)
UIGestureRecognizercanPreventGestureRecognizer in class UIGestureRecognizerpreventing - The UIGestureRecognizer that is prevented from
recognizing a gesture.Copyright © 2020. All rights reserved.