如何在iOS

时间:2017-02-01 06:52:00

标签: ios swift swift3 uitabbar uitabbaritem

我需要在iOS应用中自定义TabBar,如图enter image description here

所示

我需要更改背景颜色,未选择的图像色调颜色和选定的图像色调颜色。怎么做呢

1 个答案:

答案 0 :(得分:1)

为此,您需要设置barTintColor的{​​{1}}和tintColor属性。

UITaBbar

注意:如果两个状态的图像都表示默认和已选择,则为其集合设置两个图像,选中this answer为tabbar项目设置所选图像。现在,如果您不知道如何设置该检查this answer,请将图片中的self.tabBarController?.tabBar.barTintColor = .blue //Background Color self.tabBarController?.tabBar.tintColor = .yellow //Selected Item tint color 设置为Render mode

相关问题