gpt4 book ai didi

iphone - iOS UITabBar : Remove top shadow gradient line

转载 作者:行者123 更新时间:2023-11-29 05:51:58 27 4
gpt4 key购买 nike

我实现了一个自定义 UITabBar,并且它上面仍然有这个渐变/阴影。我添加了

[self.tabBar setBackgroundImage:[UIImage imageNamed:@"navBarBottom.png"]];

这只是改变背景但保持阴影渐变。

我做错了什么?有什么需要指定来摆脱它吗?

我有什么:

top shadow

我想要什么:

without shadow

谢谢。

最佳答案

类似的回答 this question ...如果您不想弄乱任何类型的 1x1 透明图像,那么这个工作也可以:

[[UITabBar appearance] setBackgroundImage:[[UIImage alloc] init]]; 
[[UITabBar appearance] setShadowImage:[[UIImage alloc] init]];

快速:

UITabBar.appearance().shadowImage = UIImage()
UITabBar.appearance().backgroundImage = UIImage()

关于iphone - iOS UITabBar : Remove top shadow gradient line,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55578506/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com