Type Method 型メソッド

unarchiveObject(with:)

Decodes and returns the object archived in a given NSData object. 与えられたNSDataオブジェクトの中にアーカイブされるオブジェクトをデコードして返します。

Declaration 宣言

class func unarchiveObject(with data: Data) -> Any?

Parameters パラメータ

data

An NSData object that contains an archive created using NSArchiver. あるNSDataオブジェクト、それはNSArchiverを使って作成されたアーカイブを含みます。

Return Value 戻り値

The object, or object graph, that was archived in data. Returns nil if data cannot be unarchived. オブジェクト、またはオブジェクトクラス、それはdataにおいてアーカイブされたものです。nilを返します、もしdataアンアーカイブできないならば。

Discussion 議論

This method invokes init(forReadingWith:) and decodeObject() to create a temporary NSUnarchiver object that decodes the object. If the archived object is the root of a graph of objects, the entire graph is unarchived. このメソッドは、init(forReadingWith:)decodeObject()を発動して、オブジェクトをデコードする一時NSUnarchiverオブジェクトを作成します。アーカイブされたオブジェクトがオブジェクトからなるグラフのルートであるならば、そのグラフ全体がアンアーカイブされます。

See Also 参照

Decoding objects オブジェクトをデコードする

Related Documentation 関連文書