UITabbar with partially transparent background

无人久伴 提交于 2019-12-06 06:04:46

I'm currently trying to solve a similar problem.

I believe the black color is either:

  1. The TabBars Superviews background in which case you can try to set the tabBars superviews background color. I don't have my mac here so I can't try it and I don't see that in your "tried" code.

  2. Or it's the border of the tabBar, in which you can change the bordercolor of the tabBar's frame.

    tabbar.frame.borderColor = [UIColor whiteColor];
    

You will need to import the QuartzCore framework to manipulate the boderColor.

Let me know if it helps.

I decided to go with a "hack-ish" solution I came across elsewhere.

I'm using the same color as the background in areas of the tab bar's background image to create the illusion of transparency. Not really transparent but that's the best I could come up with after countless hours spent on this.

Maybe that'll be a solution that works for someone else in a similar position in the future as well.

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