转自:http://www.cocoachina.com/bbs/read.php?tid-73015.html

 

1     NSArray *arr1 = [[NSArray alloc]initWithObjects:@"0",@"5",nil];
2 
3     NSData *data = [NSKeyedArchiver archivedDataWithRootObject:arr1];
4 
5     NSArray *arr2 = [NSKeyedUnarchiver unarchiveObjectWithData:data];
6 
7     NSLog(@"->%@",[arr1 objectAtIndex:1]);
8     NSLog(@"->%@",[arr2 objectAtIndex:1]);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
相关资源
相似解决方案