.
tabBarItem. tabBarItem , .
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.tabBarItem.title = @"Report";
self.tabBarItem.image = [[UIImage alloc] init];
}
return self;
}
UITabBar:
- (void)customizeAppearance
{
[[UITabBar appearance] setBarTintColor:[UIColor blackColor]];
[[UITabBar appearance] setTranslucent:NO];
[[UITabBarItem appearance] setTitleTextAttributes:@{ NSForegroundColorAttributeName:[UIColor whiteColor],
NSFontAttributeName: [UIFont fontWithName:@"HelveticaNeue-Thin" size:22]}
forState:UIControlStateNormal];
[[UITabBarItem appearance] setTitleTextAttributes:@{ NSForegroundColorAttributeName:RGB(0xff9700),
NSFontAttributeName: [UIFont fontWithName:@"HelveticaNeue-Thin" size:22]}
forState:UIControlStateSelected];
[[UITabBarItem appearance] setTitlePositionAdjustment:UIOffsetMake(0.0, -10.0)];
}