What I want to do is position the pop-up of these windows so that they appear above the main ContentView, while ensuring that the ContentView remains visible.
and they don’t pop up at once, so i wanna for exemple place them all above the main ContentView how can i do it?
so here is my code
main
struct Demo17App: App {
@Environment(.scenePhase) private var scenePhase
var body: some Scene {
let viewModel = OptionsViewModel()
WindowGroup {
ContentView(viewModel: viewModel)
.environmentObject(viewModel)
}
.windowStyle(.plain)
WindowGroup(id: "firstWindow") {
Text("Second Window Content [Information]")
.frame(width: 300, height: 200)
.background(Color.blue)
.zIndex(100)
}
.handlesExternalEvents(matching: Set(arrayLiteral: "firstWindow"))
.windowStyle(.plain)
WindowGroup(id: "secondWindow") {
VideoView()
.zIndex(100)
}
.handlesExternalEvents(matching: Set(arrayLiteral: "secondWindow"))
WindowGroup(id: "thirdWindow") {
ImmersiveView()
.zIndex(100)
}
.handlesExternalEvents(matching: Set(arrayLiteral: "thirdWindow"))
}
}
here is my code
New contributor
matt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.