iOS 从appDelegate跳转其他子控制器

2019-08-21  本文已影响0人  可乐小子
  1. 获取当前视图控制器

2.实现跳转到指定视图控制器
UIViewController * currentVC = [self currentViewController];
HYTAdditionalInsuranceViewController *addInsureVC = [[HYTAdditionalInsuranceViewController alloc] init];
[currentVC.navigationController pushViewController:addInsureVC animated:YES];

或者跳转到指定tabbarController
TabBarController *tabbar = [[TabBarController alloc] init];
tabbar.selectedIndex = 0;
self.window.rootViewController = tabbar;

上一篇 下一篇

猜你喜欢

热点阅读