I created a storyboard project using Xcode (9.2).
I then created a custom subclass of NSWindow and used the storyboard editor to set that as the class for my window.
class CustomWindow: NSWindow {
init() {
super.init(contentRect: NSRect.zero, styleMask: .borderless, backing: .buffered, defer: true)
self.setFrame(NSScreen.screens[0].visibleFrame, display: false)
}
}
[Edited for clarity]
The project complies ok, but upon running throws up this error on the line containing the super.init()
call:
Fatal error: Use of unimplemented initializer 'init(contentRect:styleMask:backing:defer:)'
Wouldn't the super class (NSWindow
) already contain that implementation?
What am I missing?