主要用到的、、
<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;
}