iOS 18 - How to change the tint color of elevated tabbar?

iOS 18 introduced the elevated tab bar for iPad devices. However, the tint color for UITabBar items is not changing. Adjusting the barTintColor and tintColor properties of the tab bar items does not seem to have any effect.

Answered by Frameworks Engineer in 798245022

The tab bar's text color (and image color) will inherit from the tintColor of the UITabBarController's view. Setting tabBarController.view.tintColor = ..." will allow you change that. Unfortunately, the background color of the bar cannot be changed and will respect the system appearance (or current user interface style) instead.

The tab bar's text color (and image color) will inherit from the tintColor of the UITabBarController's view. Setting tabBarController.view.tintColor = ..." will allow you change that. Unfortunately, the background color of the bar cannot be changed and will respect the system appearance (or current user interface style) instead.

@Frameworks Engineer I was able to update the tint color as you mentioned. However, the tint often doesn't update for the selected tab item. This issue seems to persist even in native apps.

In the sidebar, the selected item will use the tintColor as its accent color normally. In cases where a hardware keyboard is connected (which enables the focus system), the accent color uses labelColor when the selected item is not the actively focused item. It will use tintColor if it is focused and selected.

@Frameworks Engineer The provided tint color is not applied to images in UITab, unlike in UITabBarItem. How can this be handled?

And is there any workaround to update sidebar's accent color to use tintColor?

The sidebar also inherits its tintColor from UITabBarController's view. If you are referring to the selected item with a hardware keyboard attached (where focus is currently not on the selected item), then the default color is labelColor. If you would like to customize this farther, you can use the following UITabBarController.Sidebar APIs to customize the sidebar items:

tabBarController:sidebar:itemForRequest: tabBarController:sidebar:updateItem:

@Frameworks Engineer tabBarController:sidebar:updateItem: function is called in a random order after selecting a tab, how can I properly update the tint color for the selected item?(while hardware keyboard is connected and focus changed)

What about badgeColor ?

Would also be interested wether its possible to change the font of those items. For the old UITabBarController this was possible, but it does not apply to the new tabs. As apps often want to apply their Corporate identity to the app, the tab bar feels out of style with this..

I would also like to change the unselected item text color, but the existing APIs that used to work don't seem to work on the new elevated style. Is it not possible to change them?

I've submitted an additional FB around styling issues, styling is not being properly applied to the new _UIFloatingTabBar when running on iPad, FB15622443

iOS 18 - How to change the tint color of elevated tabbar?
 
 
Q