29,027
社区成员
发帖
与我相关
我的任务
分享
self.title = @"Detail Edit";
self.rowImage = [UIImage imageNamed:@"detailEditIcon.png"];
NSString *path = [[NSBundle mainBundle] pathForResource:@"Presidents"
ofType:@"plist"];
//self.presidents = [[NSMutableArray alloc] initWithContentsOfFile:path];
NSData *data = [[NSData alloc] initWithContentsOfFile:path];
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data];
self.presidents = [unarchiver decodeObjectForKey:@"Presidents"];
[unarchiver finishDecoding];
NSData *data = [[NSData alloc] initWithContentsOfFile:path];
id dict=[NSKeyedUnarchiver unarchiveObjectWithData:data ];
self.presidents =dict[@"Presidents"];
NSLog(@">>>>president:%@",self.presidents);