let styleMask = NSWindow.StyleMask(rawValue: windowStyle)
print("styleMask titled (styleMask.titled)")
Xcode complains:
Static member 'titled' cannot be used on instance of type 'NSWindow.StyleMask'
What to do?
let styleMask = NSWindow.StyleMask(rawValue: windowStyle)
print("styleMask titled (styleMask.titled)")
Xcode complains:
Static member 'titled' cannot be used on instance of type 'NSWindow.StyleMask'
What to do?
Try styleMask.contains(.titled)
.
Share and Enjoy
Quinn “The Eskimo!” @ DTS @ Apple
Thanks a lot. Could it be that the documentation could be improved?
static var titled: NSWindow.StyleMask { get }
It is not immediately clear (at least not to me) that to get the value on has to use contains.
Anyway, it works now.
Again many thanks to you!
Gerriet.
Could it be that the documentation could be improved?
Absolutely. Keep in mind that NSWindow.StyleMask
is part of AppKit, making this an Apple thing rather than an open source thing, so you should file your doc bug using Feedback Assistant.
Share and Enjoy
Quinn “The Eskimo!” @ DTS @ Apple