---
title: "endSheet(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/endsheet(_:)-6af2u"
---

# endSheet(_:)

Ends a SwiftUI hosted sheet presentation.

## Declaration

```swift
@MainActor @preconcurrency func endSheet<V>(_ host: NSWindow.HostingSheetRepresentation<V>) where V : View
```

## Discussion

Discussion If the hosting sheet representation was invalid or no longer presented, no effect happens.
