<!--
{
  "availability" : [
    "iOS: 3.2.0 - 9.0.0",
    "iPadOS: 3.2.0 - 9.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "MediaPlayer",
  "identifier" : "/documentation/MediaPlayer/MPMoviePlayerController/setFullscreen(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Player"
    ],
    "preciseIdentifier" : "c:objc(cs)MPMoviePlayerController(im)setFullscreen:animated:"
  },
  "title" : "setFullscreen(_:animated:)"
}
-->

# setFullscreen(_:animated:)

Causes the movie player to enter or exit full-screen mode.

```
func setFullscreen(_ fullscreen: Bool, animated: Bool)
```

## Parameters

`fullscreen`

Specify <doc://com.apple.documentation/documentation/Swift/true> to enter full-screen mode or <doc://com.apple.documentation/documentation/Swift/false> to exit full-screen mode.

`animated`

Specify <doc://com.apple.documentation/documentation/Swift/true> to animate the transition between modes or <doc://com.apple.documentation/documentation/Swift/false> to switch immediately to the new mode.

## Discussion

---

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)