//设置tabbar背景色
[[UITabBar appearance] setBarTintColor:[UIColor blackColor]];
//tabbarItem图片居中显示
UIViewController *controller = [[UIViewController alloc] init];
controller.tabBarItem.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0);
//设置tabbar背景色
[[UITabBar appearance] setBarTintColor:[UIColor blackColor]];
//tabbarItem图片居中显示
UIViewController *controller = [[UIViewController alloc] init];
controller.tabBarItem.imageInsets = UIEdgeInsetsMake(6, 0, -6, 0);
本文标题:iOS-TabBar背景色/TabbarItem图片居中
本文链接:https://www.haomeiwen.com/subject/dbyxuttx.html
网友评论