本文介绍了选择时将 TabBarController 上的每个选项卡设置为不同的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个标签栏,想根据选定的标签设置独立的色调,我知道我可以给它们着色,这样它们都会变成 1 种新颜色,但是我无法让它们各自独立选择时的颜色.有没有办法做到这一点?
I have a tab bar and want to set tints that are indipendent based on selected tab, I know I can tint them so they all change to 1 new color, however I havent been able to get them to each take on their own colour when selected. Is there a way to do this?
目前有这个,色调只是白色,我想独立地给每一个着色
currently have this, where the tint is just white, i want to tint each one indipendently
推荐答案
选择你的 Tabbar 项目并在属性检查器中设置 Selected Image
和 Image
为下面的栏项目检查图片供参考.
Select your Tabbar item and in attribute inspector set both Selected Image
and Image
for bar item check below Image for reference.
这篇关于选择时将 TabBarController 上的每个选项卡设置为不同的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!