Streaming is available in most browsers,
and in the Developer app.
-
Tailor macOS windows with SwiftUI
Make your windows feel tailor-made for macOS. Fine-tune your app's windows for focused purposes, ease of use, and to express functionality. Use SwiftUI to style window toolbars and backgrounds. Arrange your windows with precision, and make smart decisions about restoration and minimization.
Chapters
- 0:53 - Anatomy of a window
- 1:53 - App window structure
- 2:41 - Style window toolbars
- 3:53 - Refine window behaviors
- 5:55 - Adjust window placement
Resources
- Customizing window styles and state-restoration behavior in macOS
- Destination Video
- Forum: UI Frameworks
- Windows
Related Videos
WWDC24
WWDC22
-
DownloadArray
-
-
3:11 - Style Toolbars - Removing Title
.toolbar(removing: title)
-
3:14 - Style Toolbars - Removing Toolbar Background
.toolbarBackgroundVisibility(.hidden, for: .windowToolbar)
-
4:33 - Refine Behaviors - Adding Container Background
.containerBackground(.thickMaterial, for: .window)
-
5:13 - Refine Behaviors - Minimize Behavior
.windowMinimizeBehavior(.disabled)
-
5:44 - Refine Behaviors - Restoration Behavior
.restorationBehavior(.disabled)
-
7:11 - Adjust Placement - Default Placement
.defaultWindowPlacement { content, context in var size = content.sizeThatFits(.unspecified) let displayBounds = context.defaultDisplay.visibleRect // modify size based on display bounds return WindowPlacement(size: size) }
-
8:35 - Adjust Placement - Ideal Placement
.windowIdealPlacement { content, context in var size = content.sizeThatFits(.unspecified) let displayBounds = context.defaultDisplay.visibleRect // modify size based on display bounds return WindowPlacement(size: size) }
-
9:48 - Borderless Window
.windowStyle(.plain)
-
9:53 - Default Launch Behavior
.defaultLaunchBehavior(.presented)
-
-
Looking for something specific? Enter a topic above and jump straight to the good stuff.
An error occurred when submitting your query. Please check your Internet connection and try again.