---
title: "windowWillBeginSheet(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindowdelegate/windowwillbeginsheet(_:)"
---

# windowWillBeginSheet(_:)

Notifies the delegate that the window is about to open a sheet.

## Declaration

```swift
@MainActor optional func windowWillBeginSheet(_ notification: Notification)
```

## Parameters

- `notification`: A notification named doc://com.apple.appkit/documentation/AppKit/NSWindow/willBeginSheetNotification.

## Discussion

Discussion You can retrieve the window object in question by sending object to notification.

## See Also

### Managing Sheets

- [window(_:willPositionSheet:using:)](appkit/nswindowdelegate/window(_:willpositionsheet:using:).md)
- [windowDidEndSheet(_:)](appkit/nswindowdelegate/windowdidendsheet(_:).md)
