I am trying to change the status bar color to match the color of a header in my app. The problem is, the app is just a WKWebView loading a web app inside it, so I need to set the status bar to match a header of a website.
I have been trying to figure this out, and have tried several things:
- Setting the tint/background color of the main view
- Setting the tint/background color of the WKWebView
- Setting the UINavigationBarStyle
I haven't been able to get it to work at all.
For reference, here is a picture of the main bar (inside the WKWebView, and the status bar. I need a way to make them the same color.
EDIT: I found a solution here, but it only works on the iPhone 8 and below. This solution doesn't work on the iPhone X or above because there is no way to modify it so that it always fits the height of the status bar. Not that I can find at least.