我UITabbarController
在我的应用程序中使用,并且我将框架设置为它,以便标签栏显示在中心。我是如此改变标签栏的颜色和图像,但我想删除小边缘它不清楚我怎样才能清除颜色变成白色。
代码: [[UITabBar appearance] setShadowImage : [UIImage imageNamed:@"white.png"]];
我UITabbarController
在我的应用程序中使用,并且我将框架设置为它,以便标签栏显示在中心。我是如此改变标签栏的颜色和图像,但我想删除小边缘它不清楚我怎样才能清除颜色变成白色。
代码: [[UITabBar appearance] setShadowImage : [UIImage imageNamed:@"white.png"]];
另一种选择是,添加
#import <QuartzCore/QuartzCore.h>
框架和使用
self.tabBarController.tabBar.layer.borderWidth = 0.50;
self.tabBarController.tabBar.layer.borderColor = self.tabBarController.tabBar.tintColor.CGColor;
添加 clipsToBounds 并设置为 YES。
[[UITabBar appearance] setShadowImage:[UIImage imageNamed:@"transparentImage.png"]];
用透明图像试试这个。
或者
[[UITabBar appearance] setShadowImage:[[UIImage alloc] init]];
[[UITabBar appearance] setBackgroundImage:[[UIImage alloc] init]];
这些都有责任。尝试第二种方法,因为第一种方法不适合您。