1、将数组写道.plist文件中
// 在 .h中申请变量名字
@property (nonatomic, strong, readonly) NSArray *totalOrders;
//赋值数组
_totalOrders = @[@"北京", @"上海", @"天津", @"长沙", @"广州", @"石家庄"];
//写文件[_totalOrders writeToFile:@"/Users/apple/Desktop/Order.plist" atomically:YES];
1、将数组写道.plist文件中
// 在 .h中申请变量名字
@property (nonatomic, strong, readonly) NSArray *totalOrders;
//赋值数组
_totalOrders = @[@"北京", @"上海", @"天津", @"长沙", @"广州", @"石家庄"];
//写文件[_totalOrders writeToFile:@"/Users/apple/Desktop/Order.plist" atomically:YES];

被折叠的 条评论
为什么被折叠?