Questions tagged [windowgroup]
6 questions
16
votes
1 answer
Understanding Scene/WindowGroup in SwiftUI 2?
There is several objects in SwiftUI 2 like Scene and WindowGroup as some sort of Scene.
After reading documentation and looking WWDC2020 video related to scenes I see hierarchy by the following way :
Single App => One or multiple scenes =>…

Andrew_STOP_RU_WAR_IN_UA
- 9,318
- 5
- 65
- 101
7
votes
5 answers
SwiftUI WindowGroup: How to limit the number of windows?
I am building a single window application and want to use the new Swift App Lifecycle.
import SwiftUI
@main
struct SingleWindowApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
The default…

ixany
- 5,433
- 9
- 41
- 65
2
votes
1 answer
SwiftUI: Open multiple windows on App start on macOS
I'm trying to open two windows on App startup. One to show on another screen and the second to control the first window on my screen. Unfortunately I cannot get it running. I just tried to add a second WindowGroup, but it always just launches my…

pipo92
- 119
- 10
1
vote
0 answers
Detecting hardware keyboard key press under iPadOS 14.x with SwiftUI 2.0
i'm trying to add hardware keyboard support for an iOS 14.0 app written in SwiftUI 2.0.
I saw some examples working with UIHostingController, so i'd like to try this way on iOS14/SWiftui 2.0 using WindowGroup.
I'm gettin gerror when compiling in…

Fred The Dev
- 163
- 8
0
votes
0 answers
Click UINotification on Mac without opening a Window
I'm developing a status bar app for mac, and I have local notifications. When I click on one of these notifications I would like my status bar app to popup and respond to the contents of the notification (which in itself works fine).
Sadly, whenever…

LilaQ
- 349
- 5
- 19
0
votes
0 answers
How to open and configure a new Window in SwiftUI?
I want to create a web browser that if a link opens in a new window it will open a new window (tab) with the new link.
struct WebBrowserApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
struct…

Mark
- 16,906
- 20
- 84
- 117