Change Tab Bar icon/text tint color from Storyboard

我的梦境 提交于 2019-12-24 03:29:40

问题


I've read about 10 different posts like this one and they all suggest doing it in your app delegate with code.

Is it even possible to change it from within the storyboard?


回答1:


For some reason that I'm not clear on, the standard Tint properties in the Attributes Inspector have no effect.

However, if you select the tab bar and open up the Identity Inspector, you can add a custom User Defined Runtime Attribute with a Key Path of tintColor, set its type to be Color, and then specify the color that way.

Not the ideal solution I think, but it's the only way I've found so far of being able to control the color from Interface Builder.



来源:https://stackoverflow.com/questions/30175444/change-tab-bar-icon-text-tint-color-from-storyboard

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