Instance Method replacement Object For Coder:
Overridden by subclasses to substitute another object for itself during encoding.
iOS 2.0+ macOS 10.0+ Mac Catalyst 13.0+ Beta tvOS 9.0+ watchOS 2.0+ Declaration - ( ) id replacementObjectForCoder:( ) * NSCoder coder;
The coder encoding the receiver.
The object encode instead of the receiver (if different).
An object might encode itself into an archive, but encode a proxy for itself if it’s being encoded for distribution. This method is invoked by
’s implementation returns
self See Also Archiving - awake After Using Coder:
Overridden by subclasses to substitute another object in place of the object that was decoded and subsequently received this message.
class For Archiver
The class to substitute for the receiver's own class during archiving.
class For Coder
Overridden by subclasses to substitute a class other than its own during coding.
class For Port Coder
Class to substitute for the receiver in distribution encoding.
Deprecated + version
Returns the version number assigned to the class.
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