---
title: "window(_:startCustomAnimationToExitFullScreenWithDuration:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindowdelegate/window(_:startcustomanimationtoexitfullscreenwithduration:)"
---

# window(_:startCustomAnimationToExitFullScreenWithDuration:)

This method is called to start the window animation out of full-screen mode, including transitioning back to the desktop space.

## Declaration

```swift
@MainActor optional func window(_ window: NSWindow, startCustomAnimationToExitFullScreenWithDuration duration: TimeInterval)
```

## Parameters

- `window`: The window to exit to full-screen mode.
- `duration`: The duration of the presentation change.

## Discussion

Discussion You can implement this method to perform custom animation with the given duration to be in sync with the system animation. Special Considerations This method is called only if customWindowsToExitFullScreen(for:) returns non-nil.

## See Also

### Custom Full-Screen Presentation Animations

- [customWindowsToEnterFullScreen(for:)](appkit/nswindowdelegate/customwindowstoenterfullscreen(for:).md)
- [customWindowsToEnterFullScreen(for:on:)](appkit/nswindowdelegate/customwindowstoenterfullscreen(for:on:).md)
- [window(_:startCustomAnimationToEnterFullScreenWithDuration:)](appkit/nswindowdelegate/window(_:startcustomanimationtoenterfullscreenwithduration:).md)
- [window(_:startCustomAnimationToEnterFullScreenOn:withDuration:)](appkit/nswindowdelegate/window(_:startcustomanimationtoenterfullscreenon:withduration:).md)
- [windowDidFailToEnterFullScreen(_:)](appkit/nswindowdelegate/windowdidfailtoenterfullscreen(_:).md)
- [customWindowsToExitFullScreen(for:)](appkit/nswindowdelegate/customwindowstoexitfullscreen(for:).md)
- [windowDidFailToExitFullScreen(_:)](appkit/nswindowdelegate/windowdidfailtoexitfullscreen(_:).md)
