我看到有[tabBar setSelectedImageTintColor:[UIColor]]
這是偉大的,但如何設置offtate的imagetintcolor?我似乎無法找到[tabBar setImageTintColor]
或[tabBar setUnSelectedImageTintColor]
。iphone - tabbar set imagetintcolor(offstate)
1
A
回答
2
看看的UITabBarItem的文檔的「管理成品和選擇的圖像」任務的部分。
0
爲了將按鈕的外觀和感覺改變到該詳細程度,您將不得不實現自己的自定義UITabBar。這裏有一個很好的參考:
http://idevrecipes.com/2010/12/16/raised-center-tab-bar-button/
+0
,只有改變標籤欄的背景顏色,而不是使用TabBar圖像。 – John
+0
我更新了我的答案。 –
1
而對於一個快速切入「N粘貼:
NSArray *tabBarImages = [[NSArray alloc] initWithObjects:@"tab_a.png",
@"tab_b.png",
@"tab_c.png",
@"tab_d.png",
@"tab_e.png",
nil];
for (uint i=0;i<[_tabBarController.tabBar.items count];i++)
{
UITabBarItem *uitbi = [_tabBarController.tabBar.items objectAtIndex:i];
NSString *imageRef = [tabBarImages objectAtIndex:i];
[uitbi setFinishedSelectedImage:[UIImage imageNamed:imageRef] withFinishedUnselectedImage:[UIImage imageNamed:imageRef]];
}
相關問題
- 1. iphone - Tabbar使用
- 2. 的TabBar不是iphone
- 3. TabBar控制器iphone
- 4. iPhone 4 - TabBar圖標
- 5. iPhone的TabBar應用
- 6. iphone os 3.0 doc set
- 7. iphone應用程序的tabbar
- 8. iPhone的Tabbar +查看問題
- 9. iPhone從的TabBar查看
- 10. TabBar beginCustomizingItems and endCustomizingAnimated in iphone
- 11. iPhone TabBar控制器使用
- 12. 定製的TabBar在iPhone
- 13. drawRect和tabBar(iphone iOS 4)
- 14. iPhone正在更改TabBar?
- 15. 點擊的TabBar在iPhone
- 16. 的TabBar沒有在iphone
- 17. iPhone TabBar選擇取消
- 18. Iphone TABBAR菜單like documentstogo app
- 19. 的TabBar的看法,並沒有的TabBar項iPhone應用程序
- 20. TabBar支持Three20 iPhone照片庫
- 21. 關於iphone中的tabBar控制器
- 22. 異常與中的TabBar iPhone SDK的
- 23. Iphone Tabbar應用程序不旋轉
- 24. iphone/ipad選擇tabbar自定義圖像
- 25. iphone tabbar在哪裏加載數據?
- 26. iphone 5上的tabbar黑色空間
- 27. 更改tabbar的大小和顏色iphone
- 28. 的TabBar在IPhone四角應用
- 29. 更改tabbar文本顏色,iPhone
- 30. iPhone Tabbar控制器 - Itunes克隆
這並沒有解決圖像着色的問題。 –
'selectedImageTintColor'文檔清楚地說:'如果你還想自定義未選擇的圖像外觀,你必須發送setFinishedSelectedImage:withFinishedUnselectedImage:單個標籤欄項目。' – Mat
完美!這也有助於我刪除出現在圖標上的令人討厭的默認漸變的獎勵! – John