[英]Customize the tabbar and tabbar item
我在我的應用程序中使用UITabbarController
,我也將框架設置為它,以便tabbar顯示在中心。 我是如此改變tabbar的顏色和圖像,但我想刪除小邊緣不清楚我怎么能清除顏色變成白色。
代碼: [[UITabBar appearance] setShadowImage : [UIImage imageNamed:@"white.png"]];
另一個選擇是,添加
#import <QuartzCore/QuartzCore.h>
FrameWork和使用
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]];
這些都是它的責任。 嘗試第二種方法,因為首先不適合你。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.