Apparently iOS 6 tries to automatically handle the situation when you have a gesture recognizer and a UIButton
in the same place, being activated for the same gestu
I've done this to workaround the issue, change it as you see fit:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
[self MyCommonSelector];// this will work for ios 5
return Yes;
}
Add target in button where you declare so this will call in iOS 6:
[self.myButton addTarget:self action:@selector(MyCommonSelector)
forControlEvents:UIControlEventTouchUpInside];
Do your stuff in this method which will also be called on button tap and from the gesture you need to call:
-(void)MyCommonSelector
{
//Do your stuff here what you want to do with Gesture too.
}