gpt4 book ai didi

iphone - Tabbar - 选中项阴影

转载 作者:行者123 更新时间:2023-11-29 11:06:39 25 4
gpt4 key购买 nike

我已经使用 CGRectMake 增加了标签栏高度,我的问题是:我可以增加阴影(当被选中时出现在标签栏项目上)高度吗?以及如何?

最佳答案

对于你的问题,即使我以前没有尝试过,但我认为这是可能的,来自这个引用链接 http://developer.apple.com/library/ios/documentation/UIKit/Reference/UITabBar_Class/UITabBar_Class.pdf ,请看shadowImage讨论

Discussion
The default value is nil, which corresponds to the default shadow image. When non-nil, this property
represents a custom shadow image to show instead of the default. For a custom shadow image to be shown,
a custom background image must also be set using the backgroundImage (page 5) property. If the default
background image is used, then the defaultshadow image will be used regardless of the value of this property

更新:感谢 Muhannad Dasoqie,让他自己发现了这一点 :)

[self.tabbarController.tabBar setSelectionIndicatorImage:[UIImage imageNamed:@"Selected_Tab_Shadow.png"]];

关于iphone - Tabbar - 选中项阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13330090/

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