Search code examples
ios9xcode7

How to prevent the navigation bar from dissappering in is xcode7


enter image description here

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath:NSIndexPath) {

    let storyboard = UIStoryboard(name: "Customer", bundle: nil)
    var destinationVC : AnyObject!


    case 0:            //CASE FOR default i.e. First VIEWCONTROLLER
        destinationVC = storyboard.instantiateViewControllerWithIdentifier("CustomerNewQuote") as! CustomerNewQuote
        self.presentViewController(destinationVC as! UIViewController, animated: true, completion: nil)
        // showViewController(destinationVC as! UIViewController, sender: destinationVC)
        print("First tapped")

        break;

BOTH presentViewController and showViewController hide the navigation bar from the called view controller.how to prevent that from happening.I havr added Simulated Metrics and screen shot of the view in Simulator.But then to on calling the below view from other view or by crtl+drag method the navigation bar dissappears.I am new to iOS plz help.Thanks in advance.enter image description here


Solution

  • You just need to embed in navigation controller in particular view controller.enter image description here

    Select your view controller