When using a .fullScreenCover()
ViewModifier and setting its background, that background is not respected during the orientation change animation.
How can I get rid of the white background during orientation change?
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Spacer()
HStack {
Spacer()
}
}
.fullScreenCover(isPresented: .constant(true)) {
VStack {
Spacer()
HStack {
Spacer()
}
}
.background(Color.black.ignoresSafeArea())
}
.background(Color.red.ignoresSafeArea())
}
}
In this specific case it shows (partially) a white background during view resizing (open the gif in a separate window):