In PageViewController navigation not working

后端 未结 1 1709
生来不讨喜
生来不讨喜 2021-01-28 18:44

I have 3 types of VC\'s , 1st Vc, 2nd VC is PageViewController with 3 pages(I added PageController to normal ViewController here), third o

相关标签:
1条回答
  • 2021-01-28 19:32

    navigationViewController is nil so I had to do the following:

    (UIApplication.shared.keyWindow?.rootViewController as? UINavigationController)?.pushViewController(clvc, animated: true)
    
    
    // Tap gestrure selector fuction
    @objc func incomingCallsViewTapFunction(_ sender: UITapGestureRecognizer) {
        let clvc = self.storyboard?.instantiateViewController(withIdentifier: "FVC") as! FinalViewController
    //        self.navigationController?.pushViewController(clvc, animated: false)
    
        (UIApplication.shared.keyWindow?.rootViewController as? UINavigationController)?.pushViewController(clvc, animated: true)
    
    }
    
    0 讨论(0)
提交回复
热议问题