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:.