开发者

initial settings of NSUserDefaults

So I was reading this: Storing iPhone application 开发者_Go百科settings in app which seems simple enough.

However, where/how would I define the initial settings?

So for instance I have a Country setting: UK or USA. When the app is first installed/opened I want it to automatically know/set NSUserDefaults to UK.

I hope this is clear ha.

Tom


You can use the -registerDefaults: method to set up the "default defaults":

http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/UserDefaults/Tasks/UsingDefaults.html#//apple_ref/doc/uid/20000719-BAJFBAAH

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜