Initializer

init(coder:)

Required.

Returns an object initialized from data in a given unarchiver.

Declaration

init?(coder aDecoder: NSCoder)

Parameters

decoder

An unarchiver object.

Return Value

self, initialized using the data in decoder.

Discussion

You typically return self from init(coder:). If you have an advanced need that requires substituting a different object after decoding, you can do so in awakeAfter(using:).