Search code examples
iosswiftxcodenavigationitem

Top Bar in ViewController ios swift show the previous top bar


First from left.. This is home page. When i click reattempt button will open new viewcontroller which name level page (second from left)

Second from left. This is level page. It show top bar same like home page when run it.

Third from left. This is my storyboard for level page. The top bar show title and back button

Please find the below screenshot for more information.

Image

My question is why level page not show title and back button like my storyboard when i run.. ? and how to make level page show title and back button ?

I already embed in navigation controller .. Please help me..


Solution

  • let navController = self.storyboard!.instantiateViewControllerWithIdentifier("YouNewNavigationControllerIdentifier") as! UINavigationController
    self.presentViewController(navController, animated: true)
    

    Hope this will work...!!