所以我登录了UIViewController
。我想在用户给用户并传递然后单击按钮后,视图将切换到主页UITabBarController
任何人都知道如何以编程方式执行此操作?
答案 0 :(得分:1)
成功登录后,只需将窗口的根视图控制器更改为tabbarController
即可func didLoginSuccess() {
// let yourTabbarController = .....
// Dont forget to edit this, put your animation while the view change
UIApplication.shared.keyWindow?.rootViewController = yourTabbarController
}