Tabbar with custom colors

冷暖自知 提交于 2019-11-27 08:39:18

问题


I want to create a Tabbar application.My basic necessity is that i want the color of tab bar icons to be red instead of the default blue color.(i.e the selected tab icon has to be of red color instead of the default blue color provided by apple).I dont want the color of the tab bar to be changed.I want it to be of the default black color.Hope the question makes sense.

I want the tab bar to look something like this

Thanks.


回答1:


As nicktmro noted, you have to customize everything.

Check this previous answer: Changing Tint / Background color of UITabBar (check a couple of answers on this one, a later answer fixes problems with the accepted answer)

And this blog post: iPhone TabBar Custom Background Image


ADDED

Here's another one that looks clean and easy:

Custom colors in UITabBar

Be sure to read the comment on the answer.




回答2:


You will have to create your own "tab bar" controller. Unfortunately the "blue" color you are talking about is actually just an alpha level, not a shade of blue.



来源:https://stackoverflow.com/questions/4343764/tabbar-with-custom-colors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!