开发者

Writing changes to a complex CFPreferences structure

I can easily see how to add hierarchical data to a plist file via the CFPreferences api.

However, whats far less obvious how to read from a CFPreferences a value stored inside a CFDictionary (that might be stored in tur开发者_StackOverflow社区n, in a CFDictionary), and change it.


You can’t, you have to replace the root element. If this is too cumbersome, that’s a sign that you should be using model objects rather than collections and possibly move away from CFPreferences/NSUserDefaults to some other storage mechanism, perhaps Core Data.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜