Questions tagged [windowgroup]
4 questions
12
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
- 5,048
- 4
- 35
- 58
2
votes
1 answer
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
- 3,749
- 8
- 32
- 55
0
votes
0 answers
SwiftUI run duplicates window application
Please help! Im use this simple code for run my application as default for some file type (public.jpeg in info.plist)
import SwiftUI
@main
struct TestImage1App: App {
@StateObject var modelData = ModelData()
var body: some Scene {
…
serg68
- 13
- 2
0
votes
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
- 133
- 8