我想从appdelegate设置初始viewcontroller。我找到了一个很好的答案,但是在目标C中,我无法迅速实现同一目标。
通过情节提要以编程方式设置初始视图控制器
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *viewController = // determine the initial view controller here and instantiate it with [storyboard instantiateViewControllerWithIdentifier:<storyboard id>];
self.window.rootViewController = viewController;
[self.window makeKeyAndVisible];
return YES;
}
有人能帮忙吗?
我希望初始Viewcontroller依赖于使用条件语句满足的某些条件。
 噜噜哒
噜噜哒 
					三国纷争
 
					繁星淼淼
 
					holdtom
 随时随地看视频慕课网APP
随时随地看视频慕课网APP
相关分类