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.