NSBundle的对象可以获取应用程序安装目录的附件。
附件包括了,当前应用程序下,所有的文件。(图片、属性列表等)
获取XML文件
NSString *filePath = [[NSBundle mainBundle] pathForResouse:@"re" ofType:@"xml"]; NSData *data = [[NSData alloc] initWithContentsOfFile:filePath]; | |
获取属性列表
NSDictionary *dict = [NSDictionary dictionaryWithContentsOf | |