Я представляю UINavigationController
от другого UINavigationController
вот так:
let customNavigationController = CustomNavigationController()
customNavigationController.viewControllers = [myController]
customNavigationController.modalPresentationStyle = .custom
self.navigationController.present(customNavigationController, animated: true, completion: nil)
Затем, когда нажимается кнопка "закрыть", я пытаюсь закрыть ее вот так:
navigationController.dismiss(animated: true, completion: nil)
Это работает на iOS 11
, но не работает ни в iOS 9
, ни в iOS 10
. Что я упускаю или делаю не так?