简体   繁体   English

UITabBar删除黑色背景

[英]UITabBar remove the black background

As the title states, I haven't been successful in removing the black background in the UITabBar. 如标题所示,我尚未成功删除UITabBar中的黑色背景。

I know it is possible to add a subview on top of it. 我知道可以在其顶部添加一个子视图。 But I want it to be transparent so if I add a transparent subview on top of it, it will just have the underlying black color. 但是我希望它是透明的,因此,如果在其顶部添加透明的子视图,它将仅具有底层的黑色。

Setting the tintColor made me able to change the color of the UITabBar, but when I change it to clearColor it will just be black again. 设置tintColor使我能够更改UITabBar的颜色,但是当我将其更改为clearColor时,它将再次变为黑色。

Anybody know how to remove the underlying image or color so it will be transparent? 有人知道如何删除基础图像或颜色,以便透明吗?

When they added the tintColor property in iOS 5, they also added a number of other appearance-customization functionality to UITabBar . 当他们在iOS 5中添加tintColor属性时,他们还向UITabBar添加了许多其他外观自定义功能。 See, backgroundImage and selectionIndicatorImage , and the finishedSelectedImage and finishedUnselectedImage properties of UITabBarItem . 见, backgroundImageselectionIndicatorImage ,以及finishedSelectedImagefinishedUnselectedImage的性质UITabBarItem

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM