早上好
我正在创建我的第一个iphone应用程序,请耐心等待。
我已经创建了一个plist,并附上了一张图片,这样你就可以看到我是如何设置它的。
我正在尝试在Clients下添加另一个Item,其中有3个keyvalue对。
这是我目前所拥有的,但我不知道如何编辑我保存的plist。
NSString *plistCatPath = [[NSBundle mainBundle] pathForResource:@"Property List" ofType:@"plist"];
NSDictionary *clientDictionary = [[NSDictionary alloc] initWithContentsOfFile:plistCatPath];
NSMutableArray *arrayTempClients = [[NSMutableArray alloc] initWithObjects:clientDictionary[@"Clients"], nil];
NSMutableArray *array1 = [[NSMutableArray alloc] initWithArray:arrayTempClients[0]];
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
dict[@"Description"] = @"testAccount";
dict[@"Username"] = @"customUsername";
dict[@"Password"] = @"customPassword";
[array1 addObject:dict];
任何帮助都将不胜感激!