I am quite new to swift, so I tried changing the frame() width and height of the VStack in which the button/text is defined. I tried googling this particular feature but I could only find resizing images and not the whole window itself. If you could point me to any resources, that also would be great as I could not find any.
My end goal is to increase the window size as the text contents displayed keep increasing. If there is no text then the default window size should remain as small as possible. Currently I have set the window size as follows
var body: some Scene {
WindowGroup {
ContentView()
.navigationTitle("Firmware Utility")
.frame(width:300,height:300)
}
.windowResizability(WindowResizability.contentSize)
}
}
even if I remove the line of code
.windowResizability(WindowResizability.contentSize)
my window still does not expand as the text shown piles up. I asked for a button based event because it is easier to build up my end goal from there.
thanks.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: