https://github.com/martinlexow/SwiftUIWindowStyles
Showcase of window and toolbar style combinations possible with SwiftUI on macOS.
https://github.com/martinlexow/SwiftUIWindowStyles
swift swiftui xcode
Last synced: 17 days ago
JSON representation
Showcase of window and toolbar style combinations possible with SwiftUI on macOS.
- Host: GitHub
- URL: https://github.com/martinlexow/SwiftUIWindowStyles
- Owner: martinlexow
- License: mit
- Created: 2020-12-30T21:49:02.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-12-07T12:59:49.000Z (about 4 years ago)
- Last Synced: 2024-06-28T04:34:19.830Z (over 1 year ago)
- Topics: swift, swiftui, xcode
- Language: Swift
- Homepage:
- Size: 3.13 MB
- Stars: 243
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-swiftui - SwiftUIWindowStyles - Showcase of window and toolbar style combinations possible with SwiftUI on macOS. (UI / Window)
README
# SwiftUI .windowStyle() .windowToolbarStyle()
Showcase of window and toolbar styles on macOS using SwiftUI.
**ā HOW TO:** Add the `.windowStyle()` and/or `.windowToolbarStyle()` modifiers to `WindowGroup` within you `App` struct:
```swift
WindowGroup { /* ... */ }
.windowStyle(.automatic)
.windowToolbarStyle(.automatic)
```
š§āš» Have a look at the [SwiftUI source file](https://github.com/martinlexow/SwiftUIWindowStyles/blob/main/SwiftUIWindowStylesApp.swift) in order to see how to create the toolbar etc.
š¦ If you are an AppKit developer you might find this helpful as well: [NSWindowStyles](https://github.com/lukakerr/NSWindowStyles).
Feel free to make a pull request if you have a style to add.
## .windowStyle(.automatic)
### .windowToolbarStyle(.automatic)

### .windowToolbarStyle(.expanded)

### .windowToolbarStyle(.unified)

### .windowToolbarStyle(.unifiedCompact)

## .windowStyle(.hiddenTitleBar)
### .windowToolbarStyle(.automatic)

### .windowToolbarStyle(.expanded)

### .windowToolbarStyle(.unified)

### .windowToolbarStyle(.unifiedCompact)

## .windowStyle(.titleBar)
### .windowToolbarStyle(.automatic)

### .windowToolbarStyle(.expanded)

### .windowToolbarStyle(.unified)

### .windowToolbarStyle(.unifiedCompact)

## About
Iām [Martin](https://martinlexow.de), an indie dev from Berlin. Enjoying my work? Have a look at some great apps of mine on the [Mac App Store](https://apps.apple.com/developer/id955848754) š