macOS SwiftUI manager new window's life

Overview

WindowManager

macOS swiftUI manager window's life cycle

Usage

// open DocumentsView
WindowUtil.makeWindow(MyDocumentsView.self, viewType: .document)

// open SettingsView
WindowUtil.makeWindow(SettingsView.self, viewType: .setting)

// create unique without WindowGroup
WindowUtil.makeWindow(UniqueView())

// create multiple without WindowGroup
WindowUtil.makeWindow(MultiView(), allowMultiple: true)


// handleExternals
WindowGroup {
    MainView()
        .handlesExternal()
}
.handlesExternal(MainView.self)

DocumentGroup(newDocument: MyDocuments()) { file in
    MyDocumentsView()
        .environmentObject(file.document)
        .handlesExternal()
}
.handlesExternal(MyDocumentsView.self)


Settings {
    SettingsView()
        .handlesExternal()
}
.handlesExternal(SettingsView.self)

demo

You might also like...
Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Страницы доступны на sparrowcode.io/en & sparrowcode.io/ru Как добавить свое приложение Добавьте элемент в json /ru/apps/apps.json. Если ваше приложен

Template repository for quickly creating boilerplate code for a SwiftUI macOS app.
Template repository for quickly creating boilerplate code for a SwiftUI macOS app.

Sidebar App This is a template repository for quickly creating boilerplate code for a SwiftUI macOS app. License This app is released into the public

This is a template repository for quickly creating boilerplate code for a SwiftUI macOS menu bar app.
This is a template repository for quickly creating boilerplate code for a SwiftUI macOS menu bar app.

Menu Bar App This is a template repository for quickly creating boilerplate code for a SwiftUI macOS menu bar app. License This app is released into t

Crypto & Portfolio Track SwiftUI - macOS 13 Ventura & iOS 16 & watchOS 9 - MVVM
Crypto & Portfolio Track SwiftUI - macOS 13 Ventura & iOS 16 & watchOS 9 - MVVM

CryptoTrackMultiPlatformSwiftUI In this SwiftUI project, I developed a multiplatform app using as many new features as possible in the latest OS versi

A macOS application for accessing the output of the SimpleAnalytics package on the desktop.
A macOS application for accessing the output of the SimpleAnalytics package on the desktop.

The SimpleAnalytics package allows you to collect data user interaction analytic data in iOS and macOS applications. This SimpleAnalytics Reader app project allows you to more easily make sense of that collected data by displaying it on your Mac.

LinearMouse - A minimal app to get rid of mouse acceleration on macOS

LinearMouse A minimal app to get rid of mouse acceleration on macOS. Features Reverse the direction of scrolling. Linear scrolling (disable scrolling

A Swift wrapper around the CoreSymbolication private framework on macOS.

CoreSymbolication provides a very powerful system for looking up and extracting symbolic information from mach-o executables, dyld shared caches, and dSYMs.

PlayCover is a project that allows you to sideload iOS apps on macOS( currently arm, Intel support will be tested.

PlayCover is a project that allows you to sideload iOS apps on macOS( currently arm, Intel support will be tested.

macOS PropertyList Editor

PropertyListEditor About ... License Project is released under the terms of the MIT License. Repository Infos Owner: Jean-David Gadina - XS-L

Owner
Daniel
Believing in yourself is the most important thing.
Daniel
The Outline Client is a cross-platform VPN or proxy client for Windows, macOS, iOS, Android, and ChromeOS

Outline Client The Outline Client is a cross-platform VPN or proxy client for Windows, macOS, iOS, Android, and ChromeOS. The Outline Client is design

Jigsaw 7.3k Dec 31, 2022
Alfred Workflow to be used with Wooshy, that brings any macOS windows to the foreground

Wooshy: Window to the Foreground! Switch apps with Alfred. Switch app windows with Wooshy: Window to the Foreground! ScreenFlow.mp4 Why Aren't you ann

G. 31 Dec 12, 2022
Windows 10/11 lock screen replica

Diary ?? Windows 10/11 lock screen replica Preview Installation Add this repository to your package manager: TBD Install Diary Compatibility iPhone, i

alexa 51 Dec 20, 2022
A ARM macOS Virtual Machine, using macOS 12's new Virtualization framework.

macOS Virtual Machine A ARM macOS Virtual Machine, using macOS 12's new Virtualization framework. I copied KhaosT's code from here, all I did is chang

Ming Chang 127 Nov 30, 2022
The Git interface you've been missing all your life has finally arrived.

GitUp Work quickly, safely, and without headaches. The Git interface you've been missing all your life has finally arrived. Git recently celebrated it

GitUp 10.6k Jan 4, 2023
Manager the window of the mac.

WindowManager For developping WindowManager please clone the repostority. For cloing

Md Ruman Islam 2 Feb 20, 2022
Stay - a local userscript manager and an extension sample for Safari on iOS/iPadOS

Stay - a local userscript manager and an extension sample for Safari on iOS/iPadOS

shen yin 688 Dec 28, 2022
Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects

Introduction Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import the latest

Respresso 10 Nov 8, 2022
A Swift playground that comes pre-loaded with Plot, that can be used to explore the new component API.

PlotPlayground A Swift playground that comes pre-loaded with Plot, so that you can quickly try out the library and its new, SwiftUI-like API for build

John Sundell 48 Jan 5, 2023
Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Tutorials from sparrowcode.io website. You can add new, translate or fix typos. Also you can add your apps from App Store for free.

Sparrow Code 31 Jan 3, 2023