//每次点击当前tab的时候会触发 - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)vc { NSLog(@"shouldSelect"); //当前选中的tab UIViewController *selectTab = tabBarController.selectedViewController; //vc: 将要选中的tab //判断是不是选择了自己 if ([selectTab isEqual:vc]) { return false; } return true; }