开发者

How to create a .Plist that contains key ==> Value?

开发者 https://www.devze.com 2023-03-10 21:33 出处:网络
In my application I need to read data from plist alsoI need to know how to create the plist that contains the key-value data. And is there a be开发者_如何学Gotter way to read info (key-value)?The easi

In my application I need to read data from plist also I need to know how to create the plist that contains the key-value data. And is there a be开发者_如何学Gotter way to read info (key-value)?


The easiest way to read plist data is to use NSDictionary:

NSMutableDictionary *myDict = [NSMutableDictionary dictionaryWithContentsOfFile:path];

Similarly you can write it out using:

[myDict writeToFile:path atomically:NO];
0

精彩评论

暂无评论...
验证码 换一张
取 消