Reset NSUserDefaults in Settings.bundle?

Discussion in 'iOS Programming' started by Danneman101, May 21, 2009.

  1. Danneman101 macrumors 6502

    Aug 14, 2008
    In the code it is possible to reset the defaults by calling:
    [NSUserDefaults resetStandardUserDefaults];
    But how do you implement a "Reset user defaults"-button in the Settings.bundle?
  2. jnic macrumors 6502a

    Oct 24, 2008
    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.
  3. Danneman101 thread starter macrumors 6502

    Aug 14, 2008
    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 :)

Share This Page