从 UITabBar 移除灰色渐变
Removing gray gradiant from UITabBar
这是我第一次使用 UITabBar,我在让它看起来像我想要的样子时遇到了问题。
现在它上面仍然有一些灰色阴影。我似乎无法删除它!
我已将此行添加到我的代码中,但阴影仍然不断出现:
self.universalTabBar.setValue(true, forKey: "_hidesShadow");
谁能告诉我我做错了什么?
尝试设置每个标签栏项目图像的渲染模式。
universalTabBar.tintColor = UIColor.whiteColor()
for tabBarItem in universalTabBar.items! {
tabBarItem.image = image.imageWithColor(UIColor.whiteColor()).imageWithRenderingMode(.AlwaysOriginal)
}
这是我第一次使用 UITabBar,我在让它看起来像我想要的样子时遇到了问题。
现在它上面仍然有一些灰色阴影。我似乎无法删除它!
我已将此行添加到我的代码中,但阴影仍然不断出现:
self.universalTabBar.setValue(true, forKey: "_hidesShadow");
谁能告诉我我做错了什么?
尝试设置每个标签栏项目图像的渲染模式。
universalTabBar.tintColor = UIColor.whiteColor()
for tabBarItem in universalTabBar.items! {
tabBarItem.image = image.imageWithColor(UIColor.whiteColor()).imageWithRenderingMode(.AlwaysOriginal)
}