Ios 当我打开控制器时,我会看到黑屏?

Ios 当我打开控制器时,我会看到黑屏?,ios,uinavigationcontroller,uitabbarcontroller,swift4,Ios,Uinavigationcontroller,Uitabbarcontroller,Swift4,(我需要一个当前vc而不是推送vc) 我有一个选项卡和一个导航控制器界面 我的第一个选项卡栏项目vc1和第二个选项卡栏项目是vc2 推送vc工作正常这就是我所做的 步骤1-我单击vc1中的一个按钮,通过导航按钮将我导航到vc3 接下来,我单击了vc2选项卡项 然后我单击vc1选项卡项并 然后我按下vc3的后退按钮,我得到的是一个正确的应用程序流 backbutton不会弹出viewcontroller fileprivate func presentDetail(at indexPath:

(我需要一个当前vc而不是推送vc)

我有一个选项卡和一个导航控制器界面

我的第一个选项卡栏项目vc1和第二个选项卡栏项目是vc2

推送vc工作正常这就是我所做的 步骤1-我单击vc1中的一个按钮,通过导航按钮将我导航到vc3

接下来,我单击了vc2选项卡项 然后我单击vc1选项卡项并 然后我按下vc3的后退按钮,我得到的是一个正确的应用程序流

backbutton不会弹出viewcontroller

   fileprivate func presentDetail(at indexPath: IndexPath) {
        self.updateCell(at: indexPath)
        self.startLoading()
      let vc3 = storyboard?.instantiateViewController(withIdentifier: "vc3") as! vc3
            //   self.navigationController?.setViewControllers([vc,vc1], animated: true)

            vc3.modalPresentationStyle = .overCurrentContext
        vc3.data = mDataSource.shared.demoData[indexPath.row]
          if let navigator = navigationController {
            navigator.pushViewController(vc3, animated: true)
}

  @IBAction func backBtnTapped(_ sender: Any) {
        self.navigationController?.popViewController(animated: true)
       // performSegue(withIdentifier: "unwindSegueToVC1", sender: self)
    }
如何让现在的VC工作

  let vc = storyboard.instantiateViewController(withIdentifier: "vc3") as! vc3

       vc3.modalPresentationStyle = .overCurrentContext
            vc3.data = mDataSource.shared.demoData[indexPath.row]
 self.present(vc, animated: true, completion: nil)

你试过移除这条线吗

vc3.modalPresentationStyle = .overCurrentContext

只有在您要显示视图时才需要这一行。

非常抱歉,我输入的问题有误,让我编辑一下。。事实上,它正确的推动工作,我想知道是否有无论如何,使其工作为目前的vc作为目前的vc将给我空白屏幕。。。。。请阅读我编辑的问题
fileprivate func presentDetail(at indexPath: IndexPath) {

    self.updateCell(at: indexPath)
    self.startLoading()

    let vc3 = storyboard?.instantiateViewController(withIdentifier: "vc3") as! vc3
    self.hidesBottomBarWhenPushed = true //Use this line so you can hide tabbar. when you push to vc3 screen
    self.navigationController?.pushViewController(vc3, animated: true)

}

@IBAction func backBtnTapped(_ sender: Any) {
    self.navigationController?.popViewController(animated: true)
}