Simple delegation pattern: your object responds to the aMethod message, then it checks to see if any other object responds to the aMethod message by sending [otherObject replysToSelector: @selector (aMethod)], which returns bool. If otherObject does, everything is clear to you to send the message.
More technical quality factor NSInvocation method: if your object sent a message to which it cannot respond (crazyMethodName), then forwardInvocation is called on your object. By default, the implementation of forwardInvocation for NSObject simply calls doesNotRecognizeSelector, because, well, your object does not recognize the selector. You can override the default implementation of forwardInvocation by checking if another object is responding to the call selector, and calling this call on another object, if so.
source share