开发者

Preset NSUserDefaults

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜