//iOS7时,隐藏tabbar
NSInteger count = self.navigationController.viewControllers.count;
if (count == 1) {
self.tabBarController.tabBar.hidden = NO;
} else {
if (UIDeviceSystemVersion < 8.0) {
UIView *contentView;
if ([[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.tabBarController.view.subviews objectAtIndex:1];
else
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);
}
self.tabBarController.tabBar.hidden = YES;
}
NSInteger count = self.navigationController.viewControllers.count;
if (count == 1) {
self.tabBarController.tabBar.hidden = NO;
} else {
if (UIDeviceSystemVersion < 8.0) {
UIView *contentView;
if ([[self.tabBarController.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
contentView = [self.tabBarController.view.subviews objectAtIndex:1];
else
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);
}
self.tabBarController.tabBar.hidden = YES;
}