ppdelegate的Storyboard中以编程方式为UINa

ppdelegate的Storyboard中以编程方式为UINa

You can create an object of UINavigationController with your ViewController as per if/else condition and set the navigation controller as rootViewController property of window in AppDelegate as follows:LoginViewController *loginController = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil] instantiateViewControllerWithIdentifier:@"loginController"]; //or the homeControllerUINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:loginController];self.window.rootViewController = navController; 这篇关于在Appdelegate的Storyboard中以编程方式为UINavigationcontroller设置rootViewcontroller的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 09:43