Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS TabBar gets new style but content does not extend beneath it on iOS 26 / Liquid Glass [closed]

I have an existing iOS app with an old code base and a lot of UIKit with some SwiftUI mixed in. The main view controller is a UITabBarController and migration to Xcode 26 / iOS 26 / Liquid Glass is causing headaches. While the tab bar automatically gets the new style, the content of the views does not want to extend beneath it. This leaves me with a nasty looking bottom bar. See screenshot, the area around the tab bar is solid grey.

TabBar with ugly grey background

I now spent hours trying to figure out how to fix this and the closest I've gotten was to set extendedLayoutIncludesOpaqueBars = true everywhere. However this causes scrollable content to not respect the safe area and the bottom most content can't scroll above the bar. Yes I can manually add paddings everywhere, but that seems like a hack to me.

What am I missing? It can't be that hard?

like image 544
JanBrinker Avatar asked Oct 21 '25 21:10

JanBrinker


1 Answers

After poking around quite a bit, I found some old, old code to set the bar translucency to false:

tabBar.isTranslucent = false // This was the culprit

After removing that line, everything worked as it should on iOS 26.

I'll now replace it with the following, to make sure it will work the same way for devices with iOS 18 and previous:

if #unavailable(iOS 26) {
    tabBar.isTranslucent = false
}
like image 180
JanBrinker Avatar answered Oct 23 '25 11:10

JanBrinker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!