//1.1获取在Xcode项目打开的情况下创建的Plist文件
 NSString *path = [[NSBundle mainBundle]pathForResource:@"ProfessionClassify" ofType:@"plist"];

 //1.2定义数组接收文件
 NSMutableArray *tempArray = [NSMutableArray arrayWithContentsOfFile:path];

 //2.1获取ios项目沙盒中的Plist文件(在项目中通过代码创建的Plist文件)
 NSString *documentDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
 NSString *selectedPath = [documentDirectory stringByAppendingPathComponent:@"Profession.plist"];

//2.2定义数组接收文件
NSMutableArray *selectedPathArray = [NSMutableArrayarrayWithContentsOfFile:selectedPath];

这两个是不同路径下的文件,互不相同,互不干扰。

相关文章:

  • 2021-08-25
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2021-07-25
猜你喜欢
  • 2022-12-23
  • 2022-01-21
  • 2022-01-19
  • 2022-12-23
  • 2022-02-04
  • 2021-10-15
  • 2022-12-23
相关资源
相似解决方案