I looked around, but couldn't find this on the internet, nor anywhere in the Apple docs, so I'm guessing it doesn't exist.
But is there a iOS4 blocks equivalent API to:
[button addTarget:self action:@selector(tappy:) forControlEvents:UIControlEventTouchUpInside];
I suppose this could be implemented using a category, but would rather not write this myself due to extreme laziness :)
Something like this would be awesome:
[button handleControlEvent:UIControlEventTouchUpInside withBlock:^ { NSLog(@"I was tapped!"); }];
See Question&Answers more detail:os