SwiftUI: How do I save the size of a window in macOS?

Viewed 254

How can I save the size of a window so when the user resizes and clicks on the red close button (without actually terminating the app), the window stays in the same size it was before it was closed?

I'm using SwiftUI 2.0 for macOS Big Sur. Been searching for a lot of answers but none of them have worked for me.

Thanks in advance.

0 Answers
Related