struct ContentView: View {
@State private var isLoading = false
var body: some View {
VStack {
Text("Hello there")
Button("Start loading") {
isLoading.toggle()
}
.fullScreenCover(isPresented: $isLoading) {
ZStack{
Color.black.opacity(0.5).edgesIgnoringSafeArea(.all)
VStack {
ProgressView()
Button("Stop loading") {
isLoading.toggle()
}
}
}
}
}
}
}
< /code>
Проблема в том, что я не могу сделать этот экран загрузки прозрачным. лист
Так технически я хочу показать вид экрана загрузки. Я использую FullScreenCover . [code]struct ContentView: View {
@State private var isLoading = false
var body: some View { VStack { Text("Hello there") Button("Start loading") { isLoading.toggle() } .fullScreenCover(isPresented: $isLoading) { ZStack{ Color.black.opacity(0.5).edgesIgnoringSafeArea(.all) VStack { ProgressView() Button("Stop loading") { isLoading.toggle() } } } } } } } < /code> Проблема в том, что я не могу сделать этот экран загрузки прозрачным. лист [/code] или popover ведут себя так же.