I am getting this error when I call my method dismissView. Here is the method stub:
-(IBAction)dismissView
{
RootViewController *rootController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
[self.navigationController popToViewController:rootController animated:YES];
}
That should work, and I've checked, rootController is initialized and allocated. Any ideas?
let _ = self.navigationController?.popToViewController((self.navigationController?.viewControllers[1]) as! HomeViewController, animated: true)
– Pepsin