I am not certain what did I change but the full screen button now turns to a plus +
instead of expand to full icon. Moreover, the free "Enter Full Screen" menu item in View is also disabled. In other word, the right most standard window button is always a .zoomButton
but not a full screen button.
FAILED, Manually trigger entering full screen does not work either, MAC OS Xcode Swift 2.2 Fullscreen Mode
window.toggleFullScreen(self)
FAILED, Tried to change collectionBehavior
but had no luck on that either, OSX - Disable Fullscreen Mode from the zoom button?
window.collectionBehavior = .fullScreenAuxiliary
All code related to window are setting the initial window size and make it can be resized with an aspected ratio, however, disabling those code still won't restore full screen functionality.
window = NSWindow(
contentRect: NSRect(x: 0, y: 0, width: 120, height: 50),
styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView],
backing: .buffered, defer: false)
window.titlebarAppearsTransparent = true
window.contentView?.window?.aspectRatio = NSSize(
width: 120,
height: 50
)