//这里的button是自定义的UITabBarController的tabbar
-(void)selectTabbar:(int)tag
{
for (int i =0; i < 4; i ++) {
UIButton * butt = (UIButton *)[self.windowviewWithTag:10 + i];
butt.selected =NO;
}
UIButton * button = (UIButton *)[self.windowviewWithTag:10 + tag];
button.selected =YES;
_tabbarController.selectedIndex = tag;
}