开发者

NSUserDefaults Question

If I set an 开发者_运维知识库NSUserDefault in one file(playerdata.m) could I access that value from another file(calculator.m)?


Yes, so long as both are running under the same instance of NSApplication (meaning both files exist within the same program).


Yes. NSUserDefaults are available to your app and accessed by the standUserDefaults object. Check the documentation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜