I'm presenting a UINavigationController from another UINavigationController like this:
let customNavigationController = CustomNavigationController()
customNavigationController.viewControllers = [myController]
customNavigationController.modalPresentationStyle = .custom
self.navigationController.present(customNavigationController, animated: true, completion: nil)
Then, when a "close" button tapped, I try to dismiss it like this:
navigationController.dismiss(animated: true, completion: nil)
That works on iOS 11, but it is not working neither in iOS 9 nor iOS 10. What I'm missing or doing wrong?