Php 选项卡栏和导航控制器在视图控制器中无法再看到

Php 选项卡栏和导航控制器在视图控制器中无法再看到,php,xcode,swift3,xcode8,Php,Xcode,Swift3,Xcode8,这是我的登录视图控制器到主视图控制器的问题。应该是,一旦我登录,我将进入视图控制器,在那里我可以看到上面的导航控制器和下面的可能选项卡控制器。但是,在我的主视图控制器中,我再也看不到这两个控制器了。我编写了一个代码,一旦用户登录,应用程序将能够从数据库(PHP、MySQLi)中获取用户的用户id,然后将用户id的值抛出到主VC。我成功地将登录值抛出到home VC,但作为回报,我再也看不到我的导航和选项卡栏控制器。以下是我的代码供您检查: //once the user click the lo

这是我的登录视图控制器到主视图控制器的问题。应该是,一旦我登录,我将进入视图控制器,在那里我可以看到上面的导航控制器和下面的可能选项卡控制器。但是,在我的主视图控制器中,我再也看不到这两个控制器了。我编写了一个代码,一旦用户登录,应用程序将能够从数据库(PHP、MySQLi)中获取用户的用户id,然后将用户id的值抛出到主VC。我成功地将登录值抛出到home VC,但作为回报,我再也看不到我的导航和选项卡栏控制器。以下是我的代码供您检查:

//once the user click the login button
DispatchQueue.main.async()
{
   //getting the user id of the user
   let getNum = responseString
   let getBorrowNum = getNum
   self.borrowerNum.text = getBorrowNum! as String

   //going to home view controller
   if self.borrowerNum.text != nil
   {   
    let storyboard : UIStoryboard = UIStoryboard(name: "Home", bundle: nil)
    let vc : Home = storyboard.instantiateViewController(withIdentifier: "mainHome") as! Home
     vc.teststring = responseString
     self.present(vc, animated: true, completion: nil)
    }

    print("Login Success")
}
试试这个:

let vc = storyboard.instantiateViewController(withIdentifier: "mainHome") as! Home
self.navigationController!.pushViewController(vc)