---
title: "toggleFullScreen(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/togglefullscreen(_:)"
---

# toggleFullScreen(_:)

Takes the window into or out of fullscreen mode,

## Declaration

```swift
func toggleFullScreen(_ sender: Any?)
```

## Parameters

- `sender`: The object that sent the message.

## Discussion

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 the Window’s Appearance

- [styleMask](appkit/nswindow/stylemask-swift.property.md)
- [NSWindow.StyleMask](appkit/nswindow/stylemask-swift.struct.md)
- [worksWhenModal](appkit/nswindow/workswhenmodal.md)
- [alphaValue](appkit/nswindow/alphavalue.md)
- [backgroundColor](appkit/nswindow/backgroundcolor.md)
- [colorSpace](appkit/nswindow/colorspace.md)
- [setDynamicDepthLimit(_:)](appkit/nswindow/setdynamicdepthlimit(_:).md)
- [canHide](appkit/nswindow/canhide.md)
- [isOnActiveSpace](appkit/nswindow/isonactivespace.md)
- [hidesOnDeactivate](appkit/nswindow/hidesondeactivate.md)
- [collectionBehavior](appkit/nswindow/collectionbehavior-swift.property.md)
- [isOpaque](appkit/nswindow/isopaque.md)
- [hasShadow](appkit/nswindow/hasshadow.md)
- [invalidateShadow()](appkit/nswindow/invalidateshadow().md)
- [autorecalculatesContentBorderThickness(for:)](appkit/nswindow/autorecalculatescontentborderthickness(for:).md)
