public class UIPanGestureRecognizer extends UIGestureRecognizer
| Constructor and Description |
|---|
UIPanGestureRecognizer(NSSelector<UIGestureRecognizer> target)
Constructs a new UIPanGestureRecognizer object and attaches it to the
specified UIGestureRecognizer.
|
| 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 |
maximumNumberOfTouches()
Returns the maximum number of touching fingers for this pan gesture.
|
int |
minimumNumberOfTouches()
Returns the minimum number of touching fingers for this pan gesture.
|
void |
reset()
Resets internal state when the gesture recognition is completed.
|
void |
setMaximumNumberOfTouches(int maximumNumberOfTouches)
Sets the maximum number of touching fingers for this gesture in order to
be recognized as a pan gesture.
|
void |
setMinimumNumberOfTouches(int minimumNumberOfTouches)
Sets the minimum number of touching fingers for this gesture in order to
be recognized as a pan gesture.
|
void |
setTranslation(CGPoint transl,
UIView view)
Sets the specified translation value for the pan gesture in the
coordinate system of the specified view.
|
String |
toString() |
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.
|
CGPoint |
translationInView(UIView view)
Returns the translation value in the coordinate system of the specified
view.
|
CGPoint |
velocityInView(UIView view)
Returns the velocity of this pan gesture expressed as the final
point(when the gesture ends) in the coordinate system of the specified
view.
|
addTarget, cancelsTouchesInView, delaysTouchesBegan, delaysTouchesEnded, delegate, isEnabled, locationInView, locationOfTouch, numberOfTouches, removeTarget, requireGestureRecognizerToFail, setCancelsTouchesInView, setDelaysTouchesBegan, setDelaysTouchesEnded, setDelegate, setEnabled, state, viewaddObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKeypublic UIPanGestureRecognizer(NSSelector<UIGestureRecognizer> target)
target - The UIGestureRecognizer to which the new object is attached
to.public int maximumNumberOfTouches()
public void setMaximumNumberOfTouches(int maximumNumberOfTouches)
maximumNumberOfTouches - The maximum number of touching fingers for
this gesture in order to be recognized as a pan gesture.public int minimumNumberOfTouches()
public void setMinimumNumberOfTouches(int minimumNumberOfTouches)
minimumNumberOfTouches - The minimum number of touching fingers for
this gesture in order to be recognized as a pan gesture.public void reset()
UIGestureRecognizerreset in class UIGestureRecognizerpublic 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.public CGPoint translationInView(UIView view)
view - The view in whose coordinate system is expressed the
translation.public void setTranslation(CGPoint transl, UIView view)
transl - The translation value for the pan gesture.view - The view in whose coordinate system is computed the
translation.public CGPoint velocityInView(UIView view)
view - The view in which the pan gesture occurred.public String toString()
toString in class UIGestureRecognizerCopyright © 2020. All rights reserved.