我想改变视图控制器后用户登录到我的应用程序从登录故事板到我的主故事板,这项工作成功,但我收到以下警告控制台:从登录故事板移动到主要故事板在斯威夫特没有警告
2016-02-05 01:57:59.553 Commu[4749:160489] Warning: Attempt to present <UITabBarController: 0x7f93285b9d90> on <Commu.LoginViewController: 0x7f9328494e80> whose view is not in the window hierarchy!
在我登录视图控制器的代码如下:
dispatch_async(dispatch_get_main_queue(), {() -> Void in
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("MainMenu")
self.presentViewController(vc, animated: true, completion: nil)
})
是否有故事板之间移动,以避免此警告消息,更好的办法?
你如何设置你的登录故事板?那也是模式吗? – bolnad
登录页面是loginSystem故事板的初始视图控制器,在此页面上,您可以使用用户名和密码登录。如果信息不正确,则将用户信息与firebase进行核对并提供错误信息,如果信息正确,则将其发送到主菜单 –