标签:
NSBundle、NSArray、NSDictionay
读取plist文件
NSDictionary *dict= [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"fileName" ofType:@"plist"]];
NSArray*arr=[NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"fileName" ofType:@"plist"]];
NSString *bundlePath = [[[NSBundle mainBundle]bundlePath]stringByAppendingPathComponent:@"xx.bundle"];
NSBundle *bundle = [NSBundle bundleWithPath:bundlePath];
NSString *path = [bundle pathForResource:imageName ofType:@"png"];
UIImage *image=[UIImage imageWithContentsOfFile:path];
标签:
原文地址:http://www.cnblogs.com/linxiu-0925/p/5055608.html