Type Method

setValue(_:forKey:)

Sets the arbitrary keyed-data for the specified key.

Declaration

class func setValue(_ anObject: Any?, forKey key: String)

Parameters

anObject

The value for the key identified by key.

key

The name of one of the receiver's properties.

Discussion

Nested transactions have nested data scope; setting a key always sets it in the innermost scope.

See Also

Getting and Setting Transaction Properties

class func value(forKey: String) -> Any?

Returns the arbitrary keyed-data specified by the given key.

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