This is my complete code . In PageViewController navigation not working
Here when I click button in view controller of page view controller , it will navigate to next view (Final View Controller). Now i want to change the navigation bar back button .
See in above image when i click button in ViewController [View controller will load in PageViewController] it will navigate to FinalViewController
My code for navigation bar title ViewController:
@IBAction func btn(_ sender: Any) {
    print("ViewController one")
    print(variable)
    let storyboard = self.storyboard?.instantiateViewController(withIdentifier: "FVC")
    let backItem = UIBarButtonItem()
    backItem.title = "Final VC"
    //        self.navigationItem.backBarButtonItem = backItem
    (UIApplication.shared.keyWindow?.rootViewController as? UINavigationController)?.self.navigationBar.backItem?.backBarButtonItem = backItem
    (UIApplication.shared.keyWindow?.rootViewController as? UINavigationController)?.pushViewController(storyboard!, animated: true)
}
But this code not working

 
    