I have inherited my ViewController from BaseViewController and I have pushed my SecondViewController using storyboard ID.but, when I am trying to popview from second view to view controller its not working. Here is my code:
dispatch_async(dispatch_get_main_queue(), ^{
[self showMesssgeonAlert:@"Success"];
[self hideProgress];
[self.navigationController popViewControllerAnimated:TRUE];
});
Even i tried with :
NSArray *controllerArray = self.navigationController.viewControllers;
for (id controller in controllerArray)
{
if ([controller isKindOfClass:[ViewController class]])
{
[self.navigationController popViewControllerAnimated:TRUE];
}
}
but,its not working in both the conditions.What should I do?Please help me.
Try using appDelegates navigation controller so, try as follow: