// NSBundle 应用所在的文件夹
// 获取某文件的全路径
NSString *path = [[NSBundle mainBundle] pathForResource:@"文件名" ofType:@"扩展名"];
NSLog(@"%@",path);
// 只要是方法名称后面是File那么要路径就是全路径(绝对路径)
_array = [NSArray arrayWithContentsOfFile:path];
OC-UI-006.NSBundle类 用于查找应用的文件夹位置
最新推荐文章于 2022-10-11 20:56:10 发布