Changing tab bar item image and text color iOS

前端 未结 22 1132
说谎
说谎 2020-12-02 06:10

Here is my tab bar:

\"enter

The following image shows the program being run an

22条回答
  •  死守一世寂寞
    2020-12-02 06:54

    Swift 3

    This worked for me (referring to set tabBarItems image colors):

    UITabBar.appearance().tintColor = ThemeColor.Blue
    
    if let items = tabBarController.tabBar.items {
            let tabBarImages = getTabBarImages() // tabBarImages: [UIImage]
            for i in 0..

    I have noticed that if you set image with rendering mode = .alwaysOriginal, the UITabBar.tintColor doesn't have any effect.

提交回复
热议问题