NSArray文件读写
阅读原文时间:2023年07月09日阅读:1

  NSArray *arr = @[@"lnj", @"lmj", @"jjj", @"xcq"];
BOOL flag = [arr writeToFile:@"/Users/LNJ/Desktop/persons.plist" atomically:YES];
NSLog(@"%i", flag);

NSArray \*newArr = \[NSArray arrayWithContentsOfFile:@"/Users/LNJ/Desktop/persons.xml"\];  
NSLog(@"%@", newArr);