【发布时间】:2012-10-09 10:04:04
【问题描述】:
我知道我可以例如将值写入 .plist 文件
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"stored" ofType:@"plist"];
NSString *comment = @"this is a comment";
[comment writeToFile:filePath atomically:YES];
但是如果我说我的 .plist (gameArray) 中有一个数组,我想将 comment 变成我数组的特定索引,即 gameArray[4] ;我该怎么做?
请允许我澄清一下
- 我有一个plist:
stored.plist - 在我的 plist 中有一个数组
gameArray - 我想更新 plist 中
gameArray的特定索引 这可能吗 ?
【问题讨论】:
标签: objective-c xcode nsarray nsdictionary writetofile