I have a view with a tap gesture and a UIButton on it with its corresponding action.
The problem is that If I press the button its corresponding action is not getting called instead the tap handler is getting called.
I did a hitTest and stopped the gesture-handler from doing anything if the hit was on the button.
But I am unable to let the button’s action do something.
You can set your controller class to be the delegate of the UIGestureRecognizer and then implement this method:
Your hitTest method should actually achieve this, so you might also check if the UIButton is really getting an action assigned to it.