Instance Method

initWithCoder:

Returns an object initialized from data in a given unarchiver.

Required.

Declaration

- (instancetype)initWithCoder:(NSCoder *)coder;

Parameters

decoder

An unarchiver object.

Return Value

self, initialized using the data in decoder.

Discussion

You typically return self from initWithCoder:. If you have an advanced need that requires substituting a different object after decoding, you can do so in awakeAfterUsingCoder:.

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