How can I add a check in the method below so that the method will only respond to the event "UIControlEventTouchUpInside"?
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
}
Can I check the event? Like
if (event == UIControlEventTouchUpInside)
{
//Do something
}
The above code does not work. Any advise how I can check for specific events in this method?
If you want to use events like touch-up-inside, you shouldn't need to bother with low-level touch handling. Instead use
addTarget
like this: