【发布时间】:2020-09-29 00:19:32
【问题描述】:
我正在像这样模态地展示一个 NavigationController:
let profileViewController = ProfileViewController(nibName: nil, bundle: nil)
let navigationControllerProfile = UINavigationController(rootViewController: profileViewController)
navigationControllerProfile.setNavigationBarHidden(true, animated: false)
navigationControllerProfile.modalPresentationStyle = .fullScreen
self.present(navigationControllerProfile, animated: true, completion: nil)
每当我从这个 NavigationController 推送 Viewcontroller 时:
let showCaseViewController = ShowcaseViewController()
showCaseViewController.modalPresentationStyle = .overFullScreen
self.navigationController?.pushViewController(showCaseViewController, animated: true)
ViewController 被正确推送,但 1 秒后整个 NavigationController 被关闭。
【问题讨论】:
-
添加完整代码...
-
什么的完整代码?
-
我在下面发了代码试试
标签: swift uiviewcontroller presentmodalviewcontroller navigationcontroller