I have the following code where I add a UITapGestureRecognizer to my view:
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(userTapped)];
[self.view addGestureRecognizer:tap];
My problem is that when I click another UIButton(buttons were created in IB) that are on the same view as UITapGestureRecognizernothing happens.
I suppose that I add only one action (userTapped :) to gestureRecognizer, but how to add interaction with other created buttons?
source
share