私人资料库
本博客大部分技术文章,均从网络搜索得来,旨在收集整理技术资料,文章版权归属原作者,由此引起的任何版权问题,与本人无关。

转自: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]);
posted on 2011-10-28 15:10  该显示名称已被其他用户使用  阅读(393)  评论(0)    收藏  举报