I am getting this error when I call my method dismissView. Here is the method stub:
-(IBAction)dismissView
{
RootViewController *rootController = [[RootViewC
If you are using Storyboads, use this segue:
#import "PopToControllerSegue.h"
@implementation PopToControllerSegue
- (void) perform
{
UIViewController *sourceViewController = (UIViewController *)self.sourceViewController;
UIViewController *destinationViewController = (UIViewController *)self.destinationViewController;
for (UIViewController* controller in sourceViewController.navigationController.viewControllers) {
if ([controller isKindOfClass:destinationViewController.class]) {
[sourceViewController.navigationController popToViewController:controller animated:YES];
return;
}
}
NSLog(@"PopToControllerSegue has failed!");
}
@end