I\'m developing my first iPhone app, and while implementing user preferences, I have a few questions on how to best implement this.
Assume the basic MVC pattern: Mai
Have a look at NSUserDefaults. It is a dictionary style collection class designed for this particular purpose.
You store and retrieve defaults like so:
// Fetch a default
BOOL deleteBackup = [[NSUserDefaults standardUserDefaults] boolForKey:@"DeleteBackup"];
// Save a default
[[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"DeleteBackup"];
NSUserDefaults will automatically take care of reading from and serializing to disk.
Concerning your other question, it depends on the overall architecture of your app. Sending out notifications when the OptionsViewController is finished sounds like a reasonable approach to me. However, you could also just define a method on your MainViewController or app delegate (ie. "-reloadUserDefaults") that you can invoke from your OptionsViewController when it's finished.