Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/astzweig/swiftui-frameless-window
🚥 Frameless window Scene for SwiftUI. Just a bare window.
https://github.com/astzweig/swiftui-frameless-window
frameless-window macos-app scene swiftui
Last synced: 2 months ago
JSON representation
🚥 Frameless window Scene for SwiftUI. Just a bare window.
- Host: GitHub
- URL: https://github.com/astzweig/swiftui-frameless-window
- Owner: astzweig
- License: eupl-1.2
- Created: 2023-04-26T16:27:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-11T23:31:03.000Z (6 months ago)
- Last Synced: 2024-10-04T21:51:47.857Z (3 months ago)
- Topics: frameless-window, macos-app, scene, swiftui
- Language: Swift
- Homepage:
- Size: 192 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FramelessWindow
![Frameless window on macOS](Examples/Frameless-Window.png)FramelessWindow adds a new window scenes to SwiftUI. Frameless windows are
windows without a titlebar and only the close default button.
Frameless windows are often used as a launcher window, i.e. as Xcode does.## Usage
Create a window without the title bar and only the close default button.```swift
import SwiftUI
import FramelessWindow@main
struct YourApp: App {
var body: some Scene {
FramelessWindow("Window Title", id: "window-id") {
ContentView()
}
}
}
```## Documentation
The library has enriched symbol documentation for [DocC].[DocC]: https://www.swift.org/documentation/docc/documenting-a-swift-framework-or-package
## Testing `FramelessWindow`
FramelessWindow includes an executable target that launches a SwiftUI app to
test `FramelessWindow`. Either execute it with```sh
$ swift run
```or select the `TestApp` under `Product > Scheme` in Xcode.
## Adding `FramelessWindow` as a Dependency
To use the `FramelessWindow` library in a SwiftUI project,
add it to the dependencies for your package:```swift
let package = Package(
// name, platforms, products, etc.
dependencies: [
// other dependencies
.package(url: "https://github.com/astzweig/swiftui-frameless-window", from: "1.0.0"),
],
targets: [
.executableTarget(name: "", dependencies: [
// other dependencies
.product(name: "FramelessWindow", package: "swiftui-frameless-window"),
]),
// other targets
]
)
```### Supported Versions
The minimum Swift version supported by swiftui-frameless-window releases are detailed below:
swiftui-frameless-window | Minimum Swift Version
---------------------------|----------------------
`0.0.1 ...` | 5.7
`2.0.0 ...` | 5.10