wwdc20-10037

RSS for tag

Discuss WWDC20 Session 10037 - App essentials in SwiftUI

Posts under wwdc20-10037 tag

1 Post
Sort by:

Post

Replies

Boosts

Views

Activity

SwiftUI Scene with a single window on macOS
Is it possible to only allow a single window instance on macOS? WindowGroup/DocumentGroup allow the user to create multiple instances of a window. I'd like to only allow one, for an Onboarding sequence. I've checked the Scene documentation - https://developer.apple.com/documentation/swiftui/scene, and it appears the only types conforming to the Scene protocol are WindowGroup, DocumentGroup and Settings. How can I create a single Window in a SwiftUI App? An example use case: struct TutorialScene: Scene {   var body: some Scene { 	// I don't want to allow multiple windows of this Scene! 	WindowGroup { 		TutorialView() 	}	 }
6
0
4.3k
Jul ’24