We have an app which uses a mix of UIKit and SwiftUI. The nav hierarchy is:
UIKit Tab Bar > UIKit Table > SwiftUI View > UIKit View
as of iOS 15 the status bar is not taking on the color of the nav bar:
I'm trying to figure out if this is something I can fix.
Looking in Reveal it looks as tho the UIHostingView
has a white bg:
Is it possible write code to change the bg color of the status bar in this setup?
This doesn't seem possible in a UIViewControllerRepresentable
? And the hosted view is not taking up the whole screen, so changing that has no impact(?)
import SwiftUI
import PaddleCloud
struct PaddleMapView: UIViewControllerRepresentable {
typealias UIViewControllerType = MapViewController
var trip: Trip
var tripSpeeds: TripSpeeds
func makeUIViewController(context: Context) -> MapViewController {
let sb = UIStoryboard(name: "Map", bundle: nil)
let mapVC = sb.instantiateInitialViewController() as! MapViewController
mapVC.trip = trip
mapVC.tripSpeeds = tripSpeeds
return mapVC
}
}
NB: Changing the bg color in reveal does not change anything in the app.