Created
November 10, 2013 04:37
-
-
Save davidyeiser/7393876 to your computer and use it in GitHub Desktop.
Registering NSUserDefaults
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString * const EverydayWeatherUnitTempPrefKey = @"EverydayWeatherUnitTempPrefKey"; | |
NSString * const EverydayWeatherOptShowHelperTaps = @"EverydayWeatherOptShowHelperTaps"; | |
@implementation EverydayWeatherAppDelegate | |
- (BOOL)application:(UIApplication *)application | |
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// Registers applications default settings | |
NSArray *dictObjects = [NSArray arrayWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithBool:YES], nil]; | |
NSArray *dictKeys = [NSArray arrayWithObjects:EverydayWeatherUnitTempPrefKey, EverydayWeatherOptShowHelperTaps, nil]; | |
NSDictionary *defaults = [NSDictionary dictionaryWithObjects:dictObjects forKeys:dictKeys]; | |
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; | |
// OTHER STUFF | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment