2013-04-11 74 views
2

我已經研究過這個問題,仍然無法弄清楚UITabBar中白色光澤條的正確詞彙。我已經搜索了很多關於如何消除這種光澤並找不到任何東西。對於什麼我講的一個參考,請參閱本圖片:擺脫UITabBar上的白色條紋

Image of TabBar

我真的希望我失去了一些東西簡單在這裏和我不是在想這...

感謝您提前任何幫助。

回答

2

看看這段代碼有沒有幫助你。這可以在Apple Docs中找到。 http://developer.apple.com/library/ios/#documentation/uikit/reference/UITabBar_Class/Reference/Reference.html

// custom icons 
UITabBarItem *item = [[UITabBarItem alloc] init]; 
item.title = @"foo"; 
// setting custom images prevents the OS from applying a tint color 
[item setFinishedSelectedImage:[UIImage imageNamed:@"tab1_active.png"] withFinishedUnselectedImage:[UIImage imageNamed:@"tab1_image_deselected.png"]]; 
tab1ViewController.tabBarItem = item; 

// tab bar 

// set background image - will be used instead of glossy black 
tabBarController.tabBar.backgroundImage = [UIImage imageNamed:@"tab_bar_bg.png"]; 
// optionally set the tint color - setting this ti nil will result in the standard, blue tint color. tint color is ignored when custom icons are set as above. 
tabBarController.tabBar.selectedImageTintColor = nil; 
// remove the highlight around the selected tab - or provide an alternate highlight image. If you don't do this the iOS default is to draw a highlighted box beneath the selected tab icon. 
tabBarController.tabBar.selectionIndicatorImage = [[UIImage alloc] init]; 
0

沒問題,給UITabBar一個自定義背景視圖(backgroundImage)。

僅當使用默認樣式或色調時,光澤纔有。如果您設置了backgroundImage,則光澤會被清除,整個事情都將由您決定。

0

只是自定義標籤欄,所有將修復。如果需要可以給你發一些源代碼:)