Попытка представить
на
(из
), который уже представлен
.
Вот MRE, воспроизводящий проблему:
Код: Выделить всё
import SwiftUI
struct ContentView: View
{
@State private var popoverIsPresented: Bool = false
@State private var fullScreenCoverIsPresented: Bool = false
var body: some View
{
NavigationStack
{
VStack
{
Text("FullScreenPopoverTest")
}
.toolbar
{
ToolbarItem(placement: .navigationBarTrailing)
{
VStack
{
Button("Popover")
{
self.popoverIsPresented = true
}
}
.popover(isPresented: self.$popoverIsPresented)
{
Button("Fullscreen")
{
self.fullScreenCoverIsPresented = true
//this is the only workaround that works
/*self.popoverIsPresented = false
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1)
{
self.fullScreenCoverIsPresented = true
}*/
}
}
}
}
.fullScreenCover(isPresented: self.$fullScreenCoverIsPresented)
{
Button("Dismiss")
{
self.fullScreenCoverIsPresented = false
}
}
}
}
}
Код: Выделить всё
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1)
{
self.interiorDocumentToPresent = document
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... r-on-ios26
Мобильная версия