获取本地资源文件的两种方式
更新:HHH   时间:2023-1-7


//2种方式获取文件

NSBundle *bundle = [NSBundlemainBundle];

//第一种

NSString *path = [[bundle resourcePath] stringByAppendingPathComponent:@"city.plist"];


//第二种

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


返回开发技术教程...