UINavigationController popToViewController用法

Dean發表於2014-08-29
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];

// 或

for (UIViewController *controller inself.navigationController.viewControllers) {
    if ([controller isKindOfClass:[XXXController(要跳回的Controller) class]]) {
        [self.navigationControllerpopToViewController:controller animated:YES];
    }
}

棧中抽取

相關文章