我首先有一个登陆页面是ViewController,需要登陆后进入到一个TabBarController,即点即登陆页面的登陆按钮后,跳转到TabBarController,尝试过直接跳转到TabBarController或者TabBarController的第一个ViewController都不可以
直接跳转到TabBarController
objectivec
self.presentViewController(MainTabBarController(), animated: true, completion: nil)
或者跳转到第一个ViewController
objectivec
self.presentViewController(FirstViewController(), animated: true, completion: nil)
都不可以,跳转后都为黑屏,不能正确显示View
网上搜索到一些方法,都是为OC的处理方式,不是很理解(新手Swift小白,之前未接触过OC),所以前来求问,感谢
当你登录完后,你的ViewController是需要销毁的,那么你的根控制器就要切换到TabBarController。
也不是没有其他可能,不过具体问题具体分析。加油吧!