Created
February 28, 2014 07:34
-
-
Save ronaldmannak/9266851 to your computer and use it in GitHub Desktop.
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
// JLRoutes delay | |
// In this version, the viewcontroller appears instantaneously | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
UIStoryboard *rootStoryboard = [UIStoryboard storyboardWithName:@"MainFeed" bundle:nil]; | |
UIViewController *rootvc = [rootStoryboard instantiateInitialViewController]; | |
self.window.rootViewController = rootvc; | |
return YES | |
} | |
// In this version, the app displays a black screen for several seconds before | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
[JLRoutes addRoute:@"/mainfeed/" handler:^BOOL(NSDictionary *parameters) { | |
UIStoryboard *rootStoryboard = [UIStoryboard storyboardWithName:@"MainFeed" bundle:nil]; | |
UIViewController *rootvc = [rootStoryboard instantiateInitialViewController]; | |
self.window.rootViewController = rootvc; | |
return YES; | |
}]; | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"appname://mainfeed"]]; | |
return YES | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment