tags:

views:

20

answers:

0

My app sets up the default user defaults in the app delegate. I have a dictionary which contains all the default values with their keys.

The defaults are set like:

[[NSUserDefaults standardUserDefaults] registerDefaults:defaultSettingsDict];

I know I can set individual default values. But is it also possible to set a whole chunky dictionary with a lot of keys and values, as real actual user defaults? Not the defaults for the defaults, but the settings.

In other words: That dict which I want to set is not the pre-setting in case there is no key, but it contains the actual settings which the user WANTS to have (damn complicated to explain...).

Or in even other words: Lets say the app gets installed, and I set these defaults. Note that the user did not change any default settings yet: blue background, white font, green border.

Now the user goes to the settings menu and chooses the "bad theme" with all blue. The -getThemeDefaultsDict: method returns the NSDictionary containing values and keys to set in NSUserDefaults. Those are NOT just low-level "default" values in case the user didn't change anything, but they're real actual wanted values. So I can't register these with

[[NSUserDefaults standardUserDefaults] registerDefaults:themeSettingsDict];

since this makes no sense.

How is that possible?