我的应用程序中有一个带有3个条形的UITabBar。我要做的是实现自定义selectionIndicatorImage。一切都很好,除了最后一个酒吧,我得到一个奇怪的1磅填充到右边。
示例
代码
[[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"tabbar-test.png"]];
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"tabbar-selected.png"]];
尺寸
tabbar-test.png 320x49和640x98
tabbar-selected.png 107x49和214x98
答案 0 :(得分:0)
以下是与您类似的一些问题:
How do I remove UITabBarItem selectionImage padding?
UITabBar selectionIndicatorImage padding
我遇到了这个问题并没有找到一个好的解决方案。最后,我使用了第三部分控制器: