简体   繁体   English

标签栏图标太暗

[英]Tab bar icons too dark

My tab bar icons are too dark.我的标签栏图标太暗了。

I tried setting the image for unselected to a more transparent image, but it doesn't make any difference.我尝试将未选中的图像设置为更透明的图像,但这没有任何区别。 Even if I use a lighter image for the tab bar image, it doesn't change the way the unselected or selected images in the tab bar look.即使我为标签栏图像使用较亮的图像,它也不会改变标签栏中未选择或已选择的图像的外观。

How can I make the icons brighter?如何使图标更亮?

Try this尝试这个

Note - change color as per your requirement注意 -根据您的要求更改颜色

 //for selected icons
 [[UITabBar appearance] setSelectedImageTintColor:[UIColor yellowColor]];

 //for unselected icons
 [[UITabBar appearance] setTintColor:[UIColor grayColor]];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM