//返回四大tab页面+ (void)gobackToTabarController{ UINavigationController* selectedTabNavController = (UINavigationController *)[QZoneUIAppDelegate shareInstance].qqTabbarController.selectedViewController; UIViewController* pCurController = (UIViewController*)selectedTabNavController.visibleViewController; UIViewController* rootViewController = pCurController; for (; rootViewController.presentingViewController; ) { rootViewController = rootViewController.presentingViewController; } [rootViewController dismissViewControllerAnimated:NO completion:nil]; [rootViewController.navigationController popToRootViewControllerAnimated:NO];}
- (void)switchToTab:(int)tabIndex{ //通用处理,切换到好友动态的时候,将我的空间poptoroot。 if (tabIndex == 0) { [_spaceStatusController.navigationController popToRootViewControllerAnimated:NO]; [_passiveFeedController.navigationController popToRootViewControllerAnimated:NO]; [_homePageController.navigationController popToRootViewControllerAnimated:NO]; [_gameViewController.navigationController popToRootViewControllerAnimated:NO]; } if (_qqTabbarController.selectedIndex != tabIndex) { QZLOG_INFO(@"loading图流程 - 切换tab"); [_qqTabbarController setSelectedIndex:tabIndex]; } else { QZLOG_INFO(@"switchTo empty tab"); }}