Xcode 8.3.3, Swift 3
I have viewController that sets itself as the window delegate in its viewDidLoad() method.
override func viewDidLoad() {
super.viewDidLoad()
self.view.window?.delegate = self
}
It also implements the NSWindowDelegate protocol in an extension.
extension EditCustomerViewController: NSWindowDelegate {
func windowDidMove(_ notification: Notification) {
print("Window moved\n" + notification.description)
}
}
The windowDidMove() method never gets called.
Just for kicks, I implemented a custom window class that implements windowDidMove() and set the window's class to that class in the storyboard. That never got called either.
I'm obviously missing something basic here.