I have a button and a gesture recognition and when the button is pressed only one method should be called.
Most cases only the gesture recognition is being called which is fine but every no and then the button gets called to which causes problems.
I have a view and then a scroll view. All my buttons are on the scroll view
you can implement this in your view controller and assign it to the delegate of the gesture recognizer.
or you can implement
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touchwith similar logic ifgestureRecognizerShouldBegin:does not suit.