Side menu with dynamic table cell will navigate page but with navigation controller coming as nil

60 views Asked by At

I have create sidemenu using this.

But the difference is only i have used dynamic UITableViewCell instead of static.

Now i face navigation issue while click on side menu item.

I have used navigation code like:

dispatch_async(dispatch_get_main_queue()) {
    let propertyListing = self.storyboard?.instantiateViewControllerWithIdentifier("PropertyListing") as! PropertyListingController
    self.showViewController(propertyListing as UIViewController, sender: propertyListing )
}

It will navigate the page but navigation controller will be nil after that.

What can be the issue ? Any suggestion will be most appreciate.

1

There are 1 answers

0
nhgrif On BEST ANSWER

Rather than using a "show", you need to push the new view controller.

self.navigationController.pushViewController(propertyListing, animated: true)