<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/HostingSheetRepresentation",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "s:So8NSWindowC7SwiftUIE26HostingSheetRepresentationC"
  },
  "title" : "NSWindow.HostingSheetRepresentation"
}
-->

# NSWindow.HostingSheetRepresentation

A class representing a SwiftUI view hosted in an AppKit sheet.

```
class HostingSheetRepresentation<Content> where Content : View
```

## Overview

This is created and returned by
[`beginSheet(content:completionHandler:)`](/documentation/AppKit/NSWindow/beginSheet(content:completionHandler:)) as a representation
of the presented sheet. It can be used to change the root view of the
sheet while presented or be used to programamtically dismiss the sheet
from an AppKit context using [`endSheet(_:)`](/documentation/AppKit/NSWindow/endSheet(_:)-6af2u).

## Topics

### Instance Properties

[`var rootView: Content`](/documentation/AppKit/NSWindow/HostingSheetRepresentation/rootView)

The root view of the sheet.

---

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)