Contents

perform(_:with:)

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

Declaration

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

Parameters

  • aSelector:

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

  • object:

    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 perform(_:) 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

Related Documentation

Sending Messages