I am getting this error when I call my method dismissView. Here is the method stub:
-(IBAction)dismissView
{
RootViewController *rootController = [[RootViewC
Try this one line solution.
Swift 4+:
self.navigationController?.popToViewController ((self.navigationController?.viewControllers[1]) as! Your_ViewController, animated: true)
Objective-C:
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:1] animated:YES];