Instance Method

toggleFullScreen(_:)

Takes the window into or out of fullscreen mode,

Declaration

func toggleFullScreen(_ sender: Any?)

Parameters

sender

The object that sent the message.

Discussion

If an application supports fullscreen, it should add a menu item to the View menu with toggleFullScreen: as the action, and nil as the target.

See Also

Configuring Windows

var worksWhenModal: Bool

A Boolean value that indicates whether the window is able to receive keyboard and mouse events even when some other window is being run modally.

var alphaValue: CGFloat

The window’s alpha value.

var backgroundColor: NSColor!

The color of the window’s background.

var colorSpace: NSColorSpace?

The window’s color space.

var contentView: NSView?

The window’s content view, the highest accessible NSView object in the window’s view hierarchy.

var contentViewController: NSViewController?

The main content view controller for the window.

var canHide: Bool

A Boolean value that indicates whether the window can be hidden when its application becomes hidden (during execution of the NSApplicationhide(_:) method).

var isOnActiveSpace: Bool

A Boolean value that indicates whether the window is on the currently active space.

var hidesOnDeactivate: Bool

A Boolean value that indicates whether the window is removed from the screen when its application becomes inactive.

var collectionBehavior: NSWindow.CollectionBehavior

A value that identifies the window’s behavior in window collections.

var isOpaque: Bool

A Boolean value that indicates whether the window is opaque.

var hasShadow: Bool

A Boolean value that indicates whether the window has a shadow.

func invalidateShadow()

Invalidates the window shadow so that it is recomputed based on the current window shape.

func autorecalculatesContentBorderThickness(for: NSRectEdge) -> Bool

Indicates whether the window calculates the thickness of a given border automatically.

func setAutorecalculatesContentBorderThickness(Bool, for: NSRectEdge)

Specifies whether the window calculates the thickness of a given border automatically.

func contentBorderThickness(for: NSRectEdge) -> CGFloat

Indicates the thickness of a given border of the window.

func setContentBorderThickness(CGFloat, for: NSRectEdge)

Specifies the thickness of a given border of the window.

var delegate: NSWindowDelegate?

The window’s delegate.

var preventsApplicationTerminationWhenModal: Bool

A Boolean value that indicates whether the window prevents application termination when modal.