2013-12-13 81 views

回答

0
realtyTypeTabBar.selectedImageTintColor = [UIColor colorWithRed:206.0/256.0 green:221.0/256.0 blue:166.0/256.0 alpha:1]; 
[realtyTypeTabBar setSelectionIndicatorImage:[UIImage emptyImageWithSize:itemSize andBackgroundColor:[UIColor colorWithRed:84.0/256.0 green:115.0/256.0 blue:0 alpha:1]]]; 
for(UITabBarItem* item in realtyTypeTabBar.items) 
{ 
    item.image = [item.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; 
    [item setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]} forState:UIControlStateNormal]; 
    [item setTitleTextAttributes:@{NSForegroundColorAttributeName : realtyTypeTabBar.tintColor} forState:UIControlStateSelected]; 
} 
+0

感謝您的答案。我會盡快嘗試。 – CharleyB

0

你可以用故事板更改那麼容易,你只需要在tabBarController在故事板上選擇的TabBar並在展會身份檢查員在用戶定義的運行時屬性添加「unselectedItemTintColor」並將類型更改爲顏色,然後您可以選擇您想要的顏色就像一張照片you can see what I said

相關問題