Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Danneman101

macrumors 6502
Original poster
Aug 14, 2008
361
1
In the code it is possible to reset the defaults by calling:
Code:
[NSUserDefaults resetStandardUserDefaults];

But how do you implement a "Reset user defaults"-button in the Settings.bundle?
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
You can't directly. You could offer a toggle switch which the app checks for on next launch and resets accordingly. Alternatively you could handle user preferences within your app.
 

Danneman101

macrumors 6502
Original poster
Aug 14, 2008
361
1
Ok, thought there'd be some preconfigured button or something in the settings.bundle. But not too hard to implement in the manner you describe. Thanks for the info :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.