Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; errorMonitor has a deprecated constructor in /var/www/html/wp-content/plugins/404-error-monitor/index.php on line 51 UINavigationController的popToViewController用法 – 王正东博客

UINavigationController的popToViewController用法

UINavigationController popToViewController可以指定UINavigationController跳转到某一个指定UIViewController控制器

[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];

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

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据