Contents

decodeObject()

Decodes and returns an object that was previously encoded with any of the encode…Object methods.

Declaration

func decodeObject() -> Any?

Discussion

NSCoder’s implementation invokes decodeValue(ofObjCType:at:) to decode the object data.

Subclasses may need to override this method if they override any of the corresponding encode…Object methods. For example, if an object was encoded conditionally using the encodeConditionalObject(_:) method, this method needs to check whether the object had actually been encoded.

See Also

Related Documentation

Decoding General Data