Colors UItabaritem删除背景色灰色/蓝色
我想知道是否有可能删除UITabBar选定项目上的背景色 我想删除UITabBar按钮的灰色背景。有可能吗 我将选定图像和普通图像放在代理方法上:Colors UItabaritem删除背景色灰色/蓝色,colors,background,uitabbar,uitabbaritem,Colors,Background,Uitabbar,Uitabbaritem,我想知道是否有可能删除UITabBar选定项目上的背景色 我想删除UITabBar按钮的灰色背景。有可能吗 我将选定图像和普通图像放在代理方法上: - (void)tabBar:(UITabBar *)theTabBar didSelectItem:(UITabBarItem *)item{ NSUInteger indexOfTab = [[theTabBar items] indexOfObject:item]; [item setFinishedSelectedImage:
- (void)tabBar:(UITabBar *)theTabBar didSelectItem:(UITabBarItem *)item{
NSUInteger indexOfTab = [[theTabBar items] indexOfObject:item];
[item setFinishedSelectedImage:[UIImage imageNamed:
[NSString stringWithFormat:@"%u_btnH.png",indexOfTab]]
withFinishedUnselectedImage:[UIImage imageNamed:
[NSString stringWithFormat:@"%u_btn.png",indexOfTab]]
];
}
我的自定义TabBarItem图像是0_btn.png(正常)和0_btnH.png(选定/悬停图像)只需将selectionIndicatorImage设置为空图像: [[UITabBar外观]设置选择指示图像:[UIImage alloc]]