标签:io ar for 文件 cti sp on c res
一.获取图片
1. NSString *path = [[NSBuddle mainBuddle] pathForResource:@"resourceName" oftype@"resourceType"];
UIImage *image = [[UIImage imageWithContentsOfFile:path];
2. UIImage *image = [UIImage imageNamed:@"imageName"];
二.获取plist文件
NSString*path=[[NSBundle mainBundle]pathForResource:self.fileName ofType:@"plist"];
self.dataArray=[NSArray arrayWithContentsOfFile:path];
NSArray *array =[[NSArray alloc]initWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"name"ofType:@"plist"]];
NSDictionary *dict=[array objectAtIndex:index];//将plist文件中的内容转换成字典
标签:io ar for 文件 cti sp on c res
原文地址:http://www.cnblogs.com/MY-BKE/p/3947562.html