Posted on April 10, 2020
The window size is defined by the frame size of the containing view. In this example the VStack frame is set to a width of 500 and height of 300 which makes the window width 500 and height 300.
import SwiftUI
struct ContentView : View {
var body: some View {
VStack {
Text("Hello World")
}
.frame(width: 500, height: 300)
}
}
Gavin Wiggins © 2020