0
我使用的是结构化与字典数组来填充我的应用程序一个plist中。 plist中被存储在包中。我曾经在一些字典(如拼写纠错)取得了一些字符串一些变化。找到匹配的NSDictionary
appDidFinishLaunchingWithOptions
调用copyPlist
的plist中复制到文件目录,如果它不存在。因此,如果plist中确实存在,我需要检查每一个字典一些字符串更改,并替换这些字符串。
我做了两个NSMutableArrays
:
if ([fileManager fileExistsAtPath: documentsDirectoryPath]) {
NSMutableArray *newObjectsArray = [[NSMutableArray alloc] initWithContentsOfFile:documentsDirectoryPath];
NSMutableArray *oldObjectsArray = [[NSMutableArray alloc] initWithContentsOfFile:bundlePath];
//Then arrange the dictionaries that match so some their strings can be compared to each other.
}
我如何安排配套NSDictionaries
所以他们的一些字符串可以比拟的?该Name
字符串是不变的,所以这可能是用于识别匹配。
示例代码或引用有用的教程或示例代码将是巨大的,因为我自己的研究并没有导致任何有用的东西,我真的需要纠正。
一个方位正是我想要的!谢谢。 – ingenspor