[数据存储之六]plist文件读取

- (void)viewDidLoad {
    [super viewDidLoad];
    NSString* filePath = [[NSBundle mainBundle] pathForResource:@"DataList" ofType:@"plist"];
    NSDictionary* dic = [NSDictionary dictionaryWithContentsOfFile:filePath];
    [dic enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
        NSLog(@"name is:%@,value is %@",key,obj);
    }];
}
最近几个写的有些勉强,内容太少,应该放入到一个里面,但为了便于查找,还是分开吧~~~

你可能感兴趣的:(数据存储,plist)