Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Commit

Permalink
Don't defer default defaults so the UI stays in a good state
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Sep 4, 2012
1 parent bed5a44 commit 412e3f0
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Classes/CDIAppDelegate.m
Expand Up @@ -47,7 +47,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[CDKHTTPClient setDevelopmentModeEnabled:YES];
[CDKPushController setDevelopmentModeEnabled:YES];
#endif


// Default defaults
NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:
kCDITapActionCompleteKey, kCDITapActionDefaultsKey,
kCDIFontGothamKey, kCDIFontDefaultsKey,
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];

// Initialize the window
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor blackColor];
Expand Down Expand Up @@ -77,15 +84,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

// Add the transaction observer
[[SKPaymentQueue defaultQueue] addTransactionObserver:[CDITransactionObserver defaultObserver]];

// Default defaults
NSDictionary *defaults = [[NSDictionary alloc] initWithObjectsAndKeys:
kCDITapActionCompleteKey, kCDITapActionDefaultsKey,
kCDIFontGothamKey, kCDIFontDefaultsKey,
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applyStylesheet) name:kCDIFontDidChangeNotificationName object:nil];
});

return YES;
Expand Down

0 comments on commit 412e3f0

Please sign in to comment.