Class

NSSecureUnarchiveFromDataTransformer

A value transformer that converts data to and from classes that support secure coding. ある値トランスフォーマ、それはデータを保安コード化をサポートするクラスへとそしてそれから変換します。

Declaration 宣言

class NSSecureUnarchiveFromDataTransformer : ValueTransformer

Overview 概要

This class provides a default ValueTransformer implementation for secure decoding. This class attempts to decode data into the classes listed within allowedTopLevelClasses, which includes NSArray, NSDictionary, NSSet, NSString, NSNumber, NSDate, NSData, NSURL, NSUUID, and NSNull.

To archive or unarchive other classes that support NSSecureCoding, create a subclass and override allowedTopLevelClasses to list the classes to transform.

To use NSSecureUnarchiveFromDataTransformer with Core Data, use the name of this class, or the name of a subclass you implement, as the name of the transformer for an entity’s attribute within a Core Data Model. If you use your own transformer subclass, register it with your app before intializing your persistent container with Core Data.

For an example of subclassing NSSecureUnarchiveFromDataTransformer, see Handling Different Data Types in Core Data, which has a ColorToDataTransformer class that transforms UIColor to NSData and the reverse, to support archiving instances of UIColor.

Topics 話題

Getting Information About a Transformer 変換器についての情報を取得する

Relationships 関係

Inherits From 継承元

See Also 参照

Keyed Archivers キー付きアーカイバ