我想设置 appcommittee 的初始 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 依赖于使用 If判断语句所满足的某些条件。