I have made a view clickable with a tap gesture recognizer, which is working just fine. But I want to highlight the view when the touch happens en remove it when the touch e
You can also use touchesBegan:withEvent:
and touchesEnded:withEvent:
methods.
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
NSSet *t = [event touchesForView:_myView];
if([t count] > 0) {
// Do something
}
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
NSSet *t = [event touchesForView:_myView];
if([t count] > 0) {
// Do something
}
}