导航栏未出现在iPhone 7中

时间:2018-11-02 14:09:25

标签: ios xcode uinavigationcontroller swift4

我遇到的问题是导航栏未出现在iPhone 7(os-11.0.2)中。导航栏即将出现在模拟器7中。导航栏正在iOS 11.0.2中运行的其他设备中显示。问题出在iPhone 7中。

let storyboard = UIStoryboard(name: Constants.StoryBoardIdentifiers.mainStoryboard, bundle: nil)
let mainViewController = storyboard.instantiateViewController(withIdentifier: Constants.StoryBoardIdentifiers.SummaryViewController) as! SummaryViewController

let navigationController: UINavigationController = UINavigationController(rootViewController: mainViewController)

let slideController = SlideMenuController(mainViewController:navigationController, leftMenuViewController: leftViewController)
slideMenuController.automaticallyAdjustsScrollViewInsets = true
self.window?.rootViewController = slideMenuController
self.window?.makeKeyAndVisible()

有人可以帮我吗?预先感谢。

1 个答案:

答案 0 :(得分:0)

let vc = storyboard!.instantiateViewControllerWithIdentifier("TutorSignUp") as! SignUpViewController

let navigationController = UINavigationController(rootViewController: vc)

self.presentViewController(navigationController, animated: true, completion: nil)

尝试这个。...