I'm using UIPinchGestureRecognizer
on view, now I have a requirement of knowing whether pinch-in is performed or pinch-out is performed in my selector method. Either of 1 among at a time. Please give me some idea to obtain this. Thank you.
Asked
Active
Viewed 4,955 times
21
1 Answers
52
Use the .scale
property on the gesture:
- >1 pinch out
- <1 pinch in

Hemang
- 26,840
- 19
- 119
- 186

Steve Rogers
- 1,963
- 2
- 17
- 25
-
2For clarity here, as it was a bit confusing to me at first: ``scale > 1 = zoom in`` ``scale < 1 = zoom out`` – Mike Apr 06 '17 at 21:23