<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/toggleFullScreen(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)toggleFullScreen:"
  },
  "title" : "toggleFullScreen(_:)"
}
-->

# toggleFullScreen(_:)

Takes the window into or out of fullscreen mode,

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)