[UIKit学习]05.关于plist

plist是一种iOS本地化轻量级存储方式

 

创建plist

选择New File-> Resource->plist

 

加载plist

//获得Plist文件的全路径

NSBundle *bundle = [NSBundle mainBundle];

NSString *path = [bundle pathForResource:@"shops" ofType:@"plist"];

 //加载plist文件

_shops = [NSArray arrayWithContentsOfFile:path];

 

posted @ 2016-02-29 10:32  zhangjing022  阅读(115)  评论(0编辑  收藏  举报