简体   繁体   中英

Navigation Controller Issue ios

When i run my app in ios 8 everything works fine but when i run it on ios 7 the navigation bars dont show up. I double checked that i have the navigation controller embed and i do with my view controller. I use segues in the storyboard and some segues are coded because i have to wait for something to be done before you go to the next screen. As anyone else experienced this issue with the navigation bars not showing up on one version but shows up on another? Any help would be appreciated thanks.

Code i use to segue in my code:

let vc : UIViewController = self.storyboard?.instantiateViewControllerWithIdentifier("HomeViewController") as UIViewController;
self.navigationController?.pushViewController(vc, animated: true)

Try this in secondview controller -

override func viewWillAppear(animated: Bool) {
      super.viewWillAppear(true)  
      self.navigationController?.setNavigationBarHidden(false, animated: true)
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM