The responder chain is cool.
Particularly, being able to send custom actions to the first responder that will bubble up to anyone else that might be interested:
[[UIApplication sharedApplication] sendAction: @selector(commandToSend) to: nil from: self forEvent: nil]
[[UIApplication sharedApplication] sendAction: @selector(resignFirstResponder) to: nil from: self forEvent: nil]
[aResponder targetForAction: @selector(methodYouWantToSend) withSender: selfOrSomethingElse]
There's a delightful solution here to finding the first responder by exploiting the responder chain.
Once you know the first responder, it's easy to ask if the current responder chain handles a particular action. You can even find out who'll be handling it, should you wish.
const SEL action = @selector(theActionYouWantToSend); UIResponder *const currentTarget = [[UIResponder firstResponder] targetForAction: action withSender: self]; const bool actionIsHandled = currentTarget != nil;