_provincesArray = [[NSMutableArray alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"ProvincesAndCities.plist" ofType:nil]];
NSString *path =[[NSBundle mainBundle] pathForResource:@"Data" ofType:@"plist"];
NSMutableArray *array = [[NSMutableArray alloc] initWithContentsOfFile:path];
写入plist的代码:
NSString *path1 = [[NSBundle mainBundle] pathForResource:@"Data" ofType:@"plist"];
NSArray *array1 = [[NSArray alloc] initWithObjects:@"hello1",@"hello2",@"hello3",nil];
[array1 writeToFile:path1 atomically:YES];
就这么简单。