标签:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"cinemalist" ofType:@"plist"];
NSMutableDictionary *myDic = [NSMutableDictionary dictionaryWithContentsOfFile:filePath];
//读取plist文件
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"cinemalist" ofType:@"plist"];
NSMutableDictionary *myDic = [NSMutableDictionary dictionaryWithContentsOfFile:filePath];
for (NSDictionary * dic in [[myDic objectForKey:@"result"] objectForKey:@"data"]) {
//所有的title
NSString * title = [dic objectForKey:@"cinemaName"];
//所有的content
NSString * content = [dic objectForKey:@"address"];
NSLog(@"title = %@",title);
NSLog(@"content = %@",content);
}
标签:
原文地址:http://www.cnblogs.com/lidongxiao/p/4849397.html