views:

212

answers:

1

I am using UIPinchGestureRecognizer.can i write two action for pinch in and pinch out..is there any specific Method(delegate)?I have written only one it is called when i pinched in...

  UIPinchGestureRecognizer *pinchGesture = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinchGesture:)];
[self.view addGestureRecognizer:pinchGesture]; 
[pinchGesture release];
+1  A: 

You could check the gesture's .scale in -handlePinchGesture:. If it is < 1, it is a pinch-in, otherwise is a pinch-out.

KennyTM