I would like to implement a gesture recognizer (swipe action) for a button. The problem is that buttons are created programmatically and exist or do not exist based on several conditions. So, I do not know if there are buttons or how many.
I know I need something like:
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
if (touch.view == aButtonView) {
}
}
Of course, the if-statement should return Yes when you click any kind of button ...
Does anyone have an idea of ββwhat a word should mean aButtonView? Or if it is possible? Thanks in advance.
source
share