deserializePropertyListFromData:atCursor:mutableContainers:
シリアライズしたデータからプロパティリストを返します
OS X 10.2で使用停止
+(id)deserializePropertyListFromData:(NSData *)data: atCursor:(unsigned *)cursor: mutableContainers:(BOOL)mutable:
解説
シリアライズしたデータからプロパティリストを返します。
返り値
( id )
配列や辞書
引数
( NSData * )data
データ
( unsigned * )cursor
カーソル
( BOOL )mutable
変更可能なオブジェクトにするか
フレームワーク
Foundation
クラス
NSDeserializer
Class Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { id obj; unsigned cursor; NSArray *arr =[NSArray arrayWithObjects:@"aaa",@"bbb",@"ccc",nil]; NSMutableData *data = [NSMutableData dataWithCapacity:1]; //シリアライズしてデータオブジェクトに入れる [NSSerializer serializePropertyList:arr intoData:data]; //デシリアライズ obj = [NSDeserializer deserializePropertyListFromData:data atCursor:&cursor mutableContainers:NO]; NSLog([data description]); NSLog([obj description]); NSLog([NSString stringWithFormat:@"%u",cursor]); } @end