I use a custom black background in an app so I am using this code to ignore the SafeArea
var body: some View {
ZStack {
Color.backgroundColor
// vertical only for bg color but how do I keep
// the color of the font ?
.edgesIgnoringSafeArea(.vertical)
all is fine in dark mode
but in light mode the time, antenna and battery are invisible
is there a way to still keep the custom background on the top area but have the time, battery etc. in white even if the user is using light mode ?
question from:https://stackoverflow.com/questions/66062854/swiftui-how-to-keep-font-colours-in-top-edge-area