主要用到的、、
<UITabBarControllerDelegate, UITabBarDelegate>
self.delegate = self;
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController {
if (viewController == self.viewControllers[1]) {
//点击第二个tabbarItem,不切换tab,直接跳转
IODetectionViewController *order = [[IODetectionViewController alloc] init];
order.hidesBottomBarWhenPushed = YES;
[(UINavigationController *)tabBarController.selectedViewController pushViewController:order animated:YES];
return NO;
}
return YES;
}