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.
精彩评论