Tabbar

1.关闭系统渲染色,设置tabbar字体颜色
[[UITabBar appearance] setTintColor:[UIColor colorWithRed:82/255.0 green:212/255.0 blue:208/255.0 alpha:1]];

2.- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {

    //设置
    self.title = @"发现";
    UIImage *image1=[UIImage imageNamed:@"tab_fx_icon_defalut"];
    image1=[image1 imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    self.tabBarItem.image = image1;
    
    UIImage *image=[UIImage imageNamed:@"tab_fx_icon_selected"];
    image=[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    self.tabBarItem.selectedImage = image;
    
}
return self;

}

你可能感兴趣的:(Tabbar)