首页 > 移动平台 > 详细

ios读取plist文件:

时间:2017-08-18 19:15:57      阅读:285      评论:0      收藏:0      [点我收藏+]
@property (nonatomic,strong) NSArray *imageData;//定义一个数组
//懒加载数据
-(NSArray *)imageDate
{
if(_imageDate==nil)
{
    NSBundle *bundle=[NSBundle mainBundle];//mainBundle可以获取手机的任何资源
    NSString *path=[bundle pathForResource:@"imageData" ofType:@"plist"];//获取imageData.plist的全路经
    _imageData=[NSArray arrayWithContentsOffile:path];//把数据存入数组中
    
}
return _imageData;
}

 

ios读取plist文件:

原文:http://www.cnblogs.com/zqrios/p/7391083.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!