美文网首页
获取当前控制器push到下个VC - iOS

获取当前控制器push到下个VC - iOS

作者: HAKA | 来源:发表于2017-02-23 11:45 被阅读118次
收到推送跳到指定页面会用到

// 取到tabbarcontroller
UITabBarController *tabBarController = (UITabBarController*)self.window.rootViewController;
// 取到navigationcontroller
UINavigationController * navgationcontroller = (UINavigationController *)tabBarController.selectedViewController;

UIViewController *viewcontroller = [[UIViewController alloc]init];

[navgationcontroller pushViewController:viewcontroller animated:YES];

相关文章

网友评论

      本文标题:获取当前控制器push到下个VC - iOS

      本文链接:https://www.haomeiwen.com/subject/bazvwttx.html