Instance Method


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



func perform(_ aSelector: Selector!, with object1: Any!, with object2: Any!) -> Unmanaged<AnyObject>!



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


An object that is the first argument of the message.


An object that is the second argument of the message

Return Value

An object that is the result of the message.


This method is the same as perform(_:) except that you can supply two arguments for aSelector. aSelector should identify a method that can take two arguments of type id. For methods with other argument types and return values, use NSInvocation.

See Also

Sending Messages

func perform(Selector!) -> Unmanaged<AnyObject>!

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


func perform(Selector!, with: Any!) -> Unmanaged<AnyObject>!

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


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