Instance Method


Dispatches an action message to the specified target.


- (BOOL)tryToPerform:(SEL)action with:(id)object;



The action message you want to dispatch.


The target object that defines the specified selector.

Return Value

YES if either the receiver or its delegate can accept the specified selector; otherwise, NO. This method also returns NO if aSelector is nil.


The receiver tries to perform the method aSelector using its inherited tryToPerform:with: method of NSResponder. If the receiver doesn’t perform aSelector, the delegate is given the opportunity to perform it using its inherited performSelector:withObject: method of NSObject.

See Also

Posting Actions

- sendAction:to:from:

Sends the given action message to the given target.

- targetForAction:

Returns the object that receives the action message specified by the given selector.

- targetForAction:to:from:

Searches for an object that can receive the message specified by the given selector.