【发布时间】:2018-09-25 14:49:14
【问题描述】:
我已经创建了一个选项卡式应用程序,并且能够使用下面的代码以模态方式呈现一个视图,但是,我坚持关闭视图并显示选项卡栏和第一个视图控制器。
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let signUpViewController = storyboard.instantiateViewController(withIdentifier:"SignUpViewController") as! SignUpViewController
self.window?.makeKeyAndVisible()
self.window?.rootViewController = signUpViewController
【问题讨论】:
-
您没有在代码中以模态方式呈现任何内容。你用你的
signUpViewController替换你的应用程序中的rootViewController(我猜是标签栏控制器)。
标签: ios swift appdelegate modalviewcontroller presentmodalviewcontroller