Reset NSUserDefaults in Settings.bundle?

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

  1. Danneman101 macrumors 6502

    Joined:
    Aug 14, 2008
    #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?
     
  2. jnic macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #2
    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

    Joined:
    Aug 14, 2008
    #3
    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