更改故事板中的标签栏项目选定颜色 [英] Change tab bar item selected color in a storyboard

查看:127
本文介绍了更改故事板中的标签栏项目选定颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在选中时将标签栏项目更改为粉红色而不是默认的蓝色。

I want to change my tab bar items to be pink when selected instead of the default blue.

如何使用Xcode 6中的storyboard编辑器完成此操作?

How can i accomplish this using the storyboard editor in Xcode 6?

以下是我当前的设置无法正常工作,蓝色背景有效但粉红色不起作用:

Here are my current setting which are not working, the blue background works but the pink doesnt work:

推荐答案

从StoryBoard添加名为tintColor的运行时颜色属性。这是有效的(用于Xcode 8及以上)。

Add Runtime Color attribute named "tintColor" from StoryBoard. This is working(for Xcode 8 and above).

如果您想要未选择的颜色..您也可以添加 unselectedItemTintColor

if you want unselected color.. you can add unselectedItemTintColor too.

这篇关于更改故事板中的标签栏项目选定颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆