Instance Method

performSelector:withObject:

Sends a message to the receiver with an object as the argument.

Required.

Declaration

- (id)performSelector:(SEL)aSelector withObject:(id)object;

Parameters

aSelector

A selector identifying the message to send. If aSelector is NULL, an NSInvalidArgumentException is raised.

anObject

An object that is the sole argument of the message.

Return Value

An object that is the result of the message.

Discussion

This method is the same as performSelector: except that you can supply an argument for aSelector. aSelector should identify a method that takes a single argument of type id. For methods with other argument types and return values, use NSInvocation.

See Also

Sending Messages

- performSelector:

Sends a specified message to the receiver and returns the result of the message.

Required.

- performSelector:withObject:withObject:

Sends a message to the receiver with two objects as arguments.

Required.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software