无法转换 'UITabBarController' Swift 类型的值

Could not cast value of type 'UITabBarController' Swift

我知道有人问过与我相同的问题,但实际上我确实尝试了建议但一无所获,所以我想看看是否有人可以根据我的代码解决这个问题。

我有一个称为 WelcomeVC 的 LoginViewController,因为我有一个按钮可以让用户登录应用程序,一旦他们登录,如果一切正常,它会加载 TabBarVC,它有 5 个 UIViewControllers 连接到它关系 'viewcontrollers' 然而,这在 20 分钟前确实工作正常,但出于某种原因,当我去模拟器上测试它以向客户端显示它似乎在尝试登录时崩溃。

我的代码如下:

@IBAction func signUserIn(sender: AnyObject) {

    FIRAuth.auth()?.signInWithEmail(usernameTF.text!, password: passwordTF.text!, completion: { (user, error) in
        if error != nil
        {
            print("email/pass is wrong!")
        }
        else
        {
                let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
                let nextViewController = storyBoard.instantiateViewControllerWithIdentifier("tBVC") as! TabBarVC
                self.presentViewController(nextViewController, animated:true, completion:nil)
        }

    })
}

这之前工作正常并以编程方式加载下一个视图,而不是通过任何 segue。关于它为什么突然停止工作的任何建议以及关于如何修复它的任何想法?

这是错误代码:

Could not cast value of type 'UITabBarController' (0x1119548b0) to 'LT_Apps.TabBarVC' (0x10e4e9980).
(lldb) 

您没有设置 UITabBarController 的 class。像这样:

更新:
1. TabBarVC class 存在吗?
2.TabBarVC是否继承了UITabBarController
如果两者都是,只需复制粘贴 TabBarVC 到其 class 项。并建造它!