Post

Replies

Boosts

Views

Activity

SwiftUI how to control the display of a view in a window on MacOS
I need to display different WindowGroup depending on the condition, how is this possible? var body: some Scene { WindowGroup(id: "startView") { StartView(isLogined: $isLogined) .onAppear { useMiniWindowStyle(status: true) } }// startView window .windowResizability(.contentSize) WindowGroup(id: "loginView") { AuthView(currentLogin: $isLogined) .frame(minWidth: screen!.width / 1.8, minHeight: screen!.height - 200) } // loginView window .windowResizability(.contentSize) .windowStyle(HiddenTitleBarWindowStyle()) }
2
0
781
Dec ’23