An encoding method for subclasses to override such that it creates a proxy, rather than a copy, when decoded.
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
func encodeByrefObject(_ anObject: Any?)
Discussion
NSCoder
’s implementation simply invokes encode(_:)
.
This method must be matched by a corresponding decode
message.