开发者

initial settings of NSUserDefaults

开发者 https://www.devze.com 2023-01-12 20:38 出处:网络
So I was reading this: Storing iPhone application 开发者_Go百科settings in app which seems simple enough.

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

精彩评论

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