When I present the ImagePickerController the statusBar text color is still bla
I was facing a similar problem and I found the cleanest way to solve it was to override preferredStatusBarStyle
in an extension of UIImagePickerController
like so. This principal can be applied to third party libraries nicely.
extension UIImagePickerController {
open override var preferredStatusBarStyle: UIStatusBarStyle {
if isLightTheme() {
return .default // black text
}
return .lightContent // white text
}
}
isLightTheme()
is simply a function to determine whether the NavigationBar in that controller is a light or dark colour.