- (BOOL)tabBarController:(UITabBarController*)tabBarController shouldSelectViewController:(UIViewController*)viewController
{
NSLog(@"viewcontoller===%@",viewController.childViewControllers);
if([[viewController.childViewControllersobjectAtIndex:0]isKindOfClass:[FOLLOWViewControllerclass]]&&[[UserObjectsharedInstance].login_statuesintValue]!=1)
{
[JXTAlertToolsshowAlertWith:selftitle:@""message:@"你还没登录,请去登录吧."callbackBlock:^(NSIntegerindex)
{
if(index==0)
{
[GlobalObjectexitLogin];
}
}cancelButtonTitle:@"确定"destructiveButtonTitle:@"取消"otherButtonTitles:nil,nil];
returnNO;
}
returnYES;
}
网友评论