#import "BaseTabBarController.h"
ViewController *voice = [[ViewController alloc]init];
[self createTabBarItemWithController:voice title:@"" image:[UIImage imageNamed:@"首页B01"] selectImage:[UIImage imageNamed:@"首页A01"]];
voice.tabBarItem.tag = 2;
#import "AppDelegate.m"
@interface AppDelegate ()<UITabBarControllerDelegate>
@end
#pragma mark - delegate
- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController{
NSLog(@"111111111: %ld",baseTabBarController.tabBar.selectedItem.tag);
if (baseTabBarController.tabBar.selectedItem.tag == 2) {//取消tabBar的点击事件
return NO;
}else{
return YES;
}
}