WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

SOLVED: Tab Bar Transparent

Forums > iOS

Has anyone had this issue where with the Tab bar at the bottom of an app goes transparent when navigating back from another view. My app is now doing that in iOS 15. The list of items goes behind the tabbar and you can see them. I can not seem to figure out how to solve it.

Can anyone help me with this?

Thanks, Mark


IOS 15 changes the default appearance of Tab bars from opaque to transparent. To make them opaque again, you can use this code

.onAppear {
                // correct the transparency bug for Tab bars
                let tabBarAppearance = UITabBarAppearance()
                UITabBar.appearance().scrollEdgeAppearance = tabBarAppearance
                // correct the transparency bug for Navigation bars
                let navigationBarAppearance = UINavigationBarAppearance()
                UINavigationBar.appearance().scrollEdgeAppearance = navigationBarAppearance


Thanks Alexis, I appreciate that. I will implement that right away. i have been so frustrated the last coupke weeks trying to figure that out.


I apologize if I typed you name wrong. Will i need to put an onAppear on every view?


Thanks alexismoulin for the info.

appledad05 just add it in the TabView and it will show in all views.


@NigelGee thank you. it works great.


So is this behaviour on a Tab Bar having a transparent background now the default..... or is it a BUG?


Save 50% in my Black Friday sale.

SAVE 50% To celebrate WWDC22, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

Unknown user

You are not logged in

Log in or create account

Link copied to your pasteboard.