Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding pinch-in or pinch-out in UIPinchGestureRecognizer

Tags:

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.

like image 887
Kumaran Avatar asked Jul 27 '12 08:07

Kumaran


1 Answers

Use the .scale property on the gesture:

  • >1 pinch out
  • <1 pinch in
like image 150
Steve Rogers Avatar answered Sep 24 '22 00:09

Steve Rogers