开发者

NSUserDefaults Question

开发者 https://www.devze.com 2023-01-20 02:05 出处:网络
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

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

精彩评论

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