开发者

Preset NSUserDefaults

开发者 https://www.devze.com 2023-01-20 00:54 出处:网络
I thought I read some where that I开发者_开发知识库 could include a NSUserDefaults file with a cocoa app. I cannot seem to find how to do that.

I thought I read some where that I开发者_开发知识库 could include a NSUserDefaults file with a cocoa app. I cannot seem to find how to do that.

I know I could just create on first app launch but I dont want to do that just yet...


The User Defaults Programming Topics doc is your friend. You'll want to -registerDefaults:, which is going to be an NSDictionary instance created at runtime or loaded from a plist file in your app's resources folder.

As to not wanting to do it just yet, when did you plan to? If you're going to register your app's defaults at all, it's to be done at every launch.

0

精彩评论

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

关注公众号