Returns a pointer that identifies information about all of the observers that are registered with the observed object.
SDKs
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
var observationInfo: Unsafe Mutable Raw Pointer? { get set }
Return Value
A pointer that identifies information about all of the observers that are registered with the observed object, the options that were used at registration-time, and so on.
Discussion
The default implementation of this method retrieves the information from a global dictionary of observed objects keyed by memory addresses.
For improved performance, both this property and observation
can be overridden to store the opaque data pointer in an instance variable. Overrides of this property must not attempt to send messages to the stored data.