SwiftUI WindowGroup
What is WindowGroup?
WindowGroup is one of six default scene type available to you in 2023. The scene types include, WindowGroup, DocumentGroup, Settings, Window, MenuBarExtra, Immersive Space. Speaking of Scene, Scene acts as a container for a view heirarchy that you want to display to users.
For example
MenuBarExtra, places items in your Mac tool bar.
Settings, provides a settings view heirarchy.
Window Provides a single screen.
WindowGroup in particular allows you to present a group of identical structured windows, meaning every window in the group maintain independent state.
For more
WindowGroup, see tutorial Create multiple windows in VisionOS
Scene, see Apple tutorial Specifying the view hierarchy of an app using a scene
Notes mentioning this note
Create multiple windows in VisionOS
We will be creating multiple windows in VisionOS using the WindowGroup scene. WindowGroup allows you to present a group of...