Gesture Recognizer iOS gesture recognizer (Uigesturerecognizer)
- Tap gestures (UITapGestureRecognizer)
- Swipe gesture (Uiswipegesturerecognizer)
- Rotation gesture (Uirotationgesturerecognizer)
- Pinch gesture (Uipinchgesturerecognizer)
- Long-press gesture (Uilongpressgesturerecognizer)
- Pan gesture (Uipangesturerecognizer)
- Screen edge panning gesture (Uiscreenedgepangesturerecognizer)
Uigesturerecognizer
The corresponding method:
- initWithTarget:action:- addTarget:action:- removeTarget:action:
- locationInView:- locationOfTouch:inView:- numberOfTouches
Property:
- requireGestureRecognizerToFail:(eg: 单击需要双击失败)
UITapGestureRecognizer
- numberoftapsrequired (number of clicks)
- Numberoftouchesrequired (with a few fingers)
Uiswipegesturerecognizer
- direction (moving direction)
- Numberoftouchesrequired
Uirotationgesturerecognizer
- Rotation (This is the absolute value of the rotation angle, not the increment, if you need an increment value, you need to rotation 0 each time)
- Velocity (number of arcs per second, radius 1)
Uipinchgesturerecognizer
- Scale (also requires scale 1 if you need to get the increment value)
- Velocity (number of scale per second)
Uilongpressgesturerecognizer
- Minimumpressduration
- Numberoftouchesrequired
- Numberoftapsrequired
- Alowablemovement (Allow move)
Uipangesturerecognizer
- Maximumnumberoftouches
- Minimumnumberoftouches
- translationinView:- setTranslation:inView:- velocityView: (速度以 CGpoint 方式返回,可以分解为 x 和 y 两个方向的速度 )
Uiscreenedgepangesturerecognizer
>
This gesture is somewhat different from the panning gesture, which is a part of the edge of the screen to produce an effect that requires special handling when used, or conflicts with the panning gesture. Because it inherits Uipangesturerecognizer.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
IOS gesture Recognizer Overview