0

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?

AppsDev
  • 12,319
  • 23
  • 93
  • 186
  • Have a look at this answer : https://stackoverflow.com/a/31127779 –  Nov 13 '17 at 15:34
  • 1
    @TahaAmini Thanks, but there is not a selected answer there and it seems that the user who asks has pushed a view controller into a navigation controller. In my scenaro I'm presenting another navigation controller. – AppsDev Nov 13 '17 at 20:07

0 Answers0