I’m new to iOS 6 and just wanted to post a question regarding the use of NSDictionary or MutuableDictionary.
I’m used to the Android method ShardPreferences where I can write data in key/value format and overwrite etc. etc. Any SharedPreferences file can also be accessed from any scene, like a global class.
Am I looking at the right classes for what I want to do?
Once created can the content be accessed from any scene/class?
Thanks,
you can use
NSUserDefaultsFor example, you could save a profile image set by the user or a default color scheme for the application.
With NSUserDefaults you can save objects from the following class types:
If you want to store any other type of object, such as a UIImage, you will typically need to archive it or wrap it in an instance of NSData, NSNumber, or NSString.
Example