NSDictionaryは非常に便利。
NSMutableDictionary *appDict;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES);
NSString *path = [paths objectAtIndex:0];
path = [path stringByAppendingPathComponent:@"app.plist"];
if ([[NSFileManagerdefaultManager] fileExistsAtPath:path]) {
NSMutableDictionary *appDict = [NSDictionarydictionaryWithContentsOfFile:path];
//何かの処理
[appDict writeToFile:path atomically:YES];
} else {
}
0 件のコメント:
コメントを投稿