2014年4月11日 星期五

pop到某一個特定的view

AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]
NSMutableArray *allViewControllers = [NSMutableArray arrayWithArray:[appDelegate.navigationController viewControllers]];
for (UIViewController *aViewController in allViewControllers) {
    if ([aViewController isKindOfClass:[RequiredViewController class]]) {
        [self.navigationController popToViewController:aViewController animated:NO];
    }
}

沒有留言:

張貼留言