iOS解档归档

来源:互联网 发布:农村淘宝电话号码多少 编辑:程序博客网 时间:2024/04/30 03:27

    NSArray *array = [NSArrayarrayWithObjects:@"one",@"two", @"three",nil];

    NSString *filePath = [NSHomeDirectory()stringByAppendingPathComponent:@"arry.plist"];

    [NSKeyedArchiverarchiveRootObject:array toFile:filePath];

   NSArray * arr = [NSKeyedUnarchiverunarchiveObjectWithFile:filePath];

   NSLog(@"%@",arr);

0 0
原创粉丝点击