Function

objc_getAssociatedObject

Returns the value associated with a given object for a given key.

Declaration

id objc_getAssociatedObject(id object, const void *key);

Parameters

object

The source object for the association.

key

The key for the association.

Return Value

The value associated with the key key for object.

See Also

Associative References

objc_setAssociatedObject

Sets an associated value for a given object using a given key and association policy.

objc_removeAssociatedObjects

Removes all associations for a given object.

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