Reputation: 1233
I've set up my app's user defaults to contain two toggle switches - one for help, one for sound. They are working however the starting values are false even though I've set them to be YES:
I use BOOL variables to track these values in the app, so I'd like to store YES/NO values. What else do I need to do to get the correct starting values?
Upvotes: 2
Views: 1534
Reputation: 1233
I found the answer to this. Apparently there is an Application Domain AND a Registration Domain that aren't in sync the first time the app is run. The solution that worked for me is here:
http://excitabyte.wordpress.com/2009/08/12/keeping-user-defaults-synchronized-with-settings-bundle/
Not good when you want to have help and sound enabled the first time your app is run! Come on Apple.
Upvotes: 1
Reputation: 3373
Uhm... Aren't toggle switches setup this way:
http://screencast.com/t/bGCGIZara
Upvotes: 0