protocol Scene
enum ScenePhase
struct SceneBuilder
Technology
A scene represents a part of your app’s user interface that has a life cycle managed by the system. An App
instance presents the scenes it contains, while each Scene
acts as the root element of a View
hierarchy.
The system presents scenes in different ways depending on the type of scene, the platform, and the context. A scene might fill the entire display, part of the display, a window, a tab in a window, or something else. In some cases, your app might also be able to display more than one instance of the scene at a time, like when a user simultaneously opens multiple documents based on a single Document
declaration in your app.
You configure scenes using modifiers, similar to how you configure views. For example, you can adjust the appearance of the window that contains a scene — if the scene happens to appear in a window — using the window
modifier. Similarly, you can add menu commands that become available when the scene is in the foreground on certain platforms using the commands(content:)
modifier.
protocol Scene
enum ScenePhase
struct SceneBuilder
struct WindowGroup
struct Settings
struct WKNotificationScene
protocol WindowStyle
protocol WindowToolbarStyle
protocol Commands
struct CommandMenu
struct CommandGroup
struct CommandsBuilder
ViewBuilder
, it supports up to ten expressions in the closure body.struct CommandGroupPlacement
struct SidebarCommands
struct TextEditingCommands
struct TextFormattingCommands
struct ToolbarCommands
struct ImportFromDevicesCommands
struct EmptyCommands