I want to create a status bar with a black opaque background and white text. To do this I did the following:
- In my .plist set the "UIViewControllerBasedStatusBarAppearance" to "NO"
- In my .plist set the "UIStatusBarStyle LightContent" to "UIStatusBarStyleLightContent"
- Create an UIView in my storyboard with the following constraints:
Now I have a status bar with white text and an opaque background, like this (Ignore the background picture):
However when I scroll, the UIView background won't stick underneath the statusbar, for example:
This probably has to do with the vertical constraint, which should link to the top layout guide instead of the superview, but this constraint is not showing in xcode and I have no idea what else could be wrong.