My app needs to run on macOS 11+. It has one window of fixed size i.e. it should NOT be resizable.
.windowResizability(.contentSize) is only available in macOS 13+.
How can window resizability be disabled in macOS 11 and 12 ?
I'm running Xcode 16.2 on macOS 15.3.2.
Thanks.
Hi, did you check with this: I know its AppKit based, but you can mix&match both Frameworks.
[https://developer.apple.com/documentation/appkit/nswindow/stylemask-swift.property)
[https://developer.apple.com/documentation/appkit/nswindow/stylemask-swift.struct)
if let window = NSApplication.shared.windows.first {
window.styleMask.remove(.resizable)
window.setContentSize(NSSize(
width: 400,
height: 400)
)
}