Objective-C
- 3 ответа
- 0 вопросов
2
Вклад в тег
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"YourStoryboardName" bundle:nil];
UIViewController *firstViewControllerToShow = nil;
if (yourCondition) {
firstViewControllerToShow =
[storyboard instantiateInitialViewController];
} else {
firstViewControllerToShow =
[storyboard instantiateViewControllerWithIdentifier:@"YourAlternativeSceneStoryboardID"];
}
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = firstViewControllerToShow;
[self.window makeKeyAndVisible];
return YES;
}