3

UITabbarController在我的应用程序中使用,并且我将框架设置为它,以便标签栏显示在中心。我是如此改变标签栏的颜色和图像,但我想删除小边缘它不清楚我怎样才能清除颜色变成白色。

代码: [[UITabBar appearance] setShadowImage : [UIImage imageNamed:@"white.png"]]; 在此处输入图像描述

4

3 回答 3

6

另一种选择是,添加

#import <QuartzCore/QuartzCore.h>

框架和使用

self.tabBarController.tabBar.layer.borderWidth = 0.50;
self.tabBarController.tabBar.layer.borderColor = self.tabBarController.tabBar.tintColor.CGColor;
于 2013-08-16T08:30:24.037 回答
1

添加 clipsToBounds 并设置为 YES。

clipsToBounds

于 2015-06-14T02:53:03.727 回答
0
[[UITabBar appearance] setShadowImage:[UIImage imageNamed:@"transparentImage.png"]];

用透明图像试试这个。

或者

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

这些都有责任。尝试第二种方法,因为第一种方法不适合您。

于 2013-08-16T08:28:59.600 回答