I create a NSWindowController
and NSViewController
using Interface Builder, And then, i removed the NSWindow's
titlebar so that I can custom Window. i create a class subclass NSWindow
And do following things in class.
override var canBecomeKey: Bool {
return true
}
override var canBecomeMain: Bool {
return true
}
i also set these in NSWindowController
:
{
self.window?.becomeKey()
self.window?.isMovableByWindowBackground = true
self.window?.isMovable = true;
self.window?.acceptsMouseMovedEvents = true
}
from here, the custom Window is can be dragged,
But when i make the NSViewController
as the NSWindowController's
ContentViewController
, i can not drag the customWindow
.
What could be happening here?