Before updating to xcode 13, the status bar’s background color matched the color of the navigation bar. When I updated to xcode 13, the status bar is behaving strangely. It is showing different background colors in different view controllers. Some are black, some are gray, and some are transparent. I tried overriding the status bar style but it didn’t work. There has been no change in the code whatsoever since the update. I want the status bar’s background color to match that of the navigation bar.
2
Answers
You did not give code example how you are setting status bar – are you using
statusBarManager
? Maybe you are using some code that became deprecated?You can try set it with extension with
statusBarManager
inviewDidAppear
:And then in your view call it like:
SwiftUI answer:
Try adding
.ignoresSafeArea()
to whatever parent of your child views is. I encountered a similar issue back in the day and solved it by something like this: