I am developing a iOS app.
I add an UIPinchGestureRecognizer to listen the pinch out action.
[[self view]addGestureRecognizer:[[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinchOutGesture:)]];
-(void)handlePinchOutGesture:(UIPinchGestureRecognizer*)recognizer {
if (recognizer.state == UIGestureRecognizerStateBegan) {
// Do something
} else if (recognizer.state == UIGestureRecognizerStateChanged) {
// Do something
} else {
// Do something
}
}
However, I want to add an UITapGestureRecognizer as well so that it will have the same effect when user tap an item.
Is there a way to simulate "pinch out" gesture programmatically?