I want to have a single method for all the buttons (and all their events) of a view. So far this is what I've got:
- (IBAction)uibuttonEvent:(id)idSender forEvent:(UIEvent*)uieventHandle
{
if (idSender == [self uibuttonConnectInput]) {
if ([uieventHandle type] == UIEventTypeTouches) {
[[self uibuttonConnectInput] setTitle:@"did it!" forState:UIControlStateNormal];
}
} else if (idSender == [self uibuttonSomething]) {
...
}
}
So now I can detect whether the event is a UIEventTypeTouches
or not, but I want to check more specifically whether it is e.g. UIControlEventTouchUpInside
- how can I do that?