---
title: "drawerWillOpen(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdrawerdelegate/drawerwillopen(_:)"
---

# drawerWillOpen(_:)

Notifies the delegate that the drawer will open.

## Declaration

```swift
optional func drawerWillOpen(_ notification: Notification)
```

## Parameters

- `notification`: An doc://com.apple.appkit/documentation/AppKit/NSDrawerDelegate notification, sent by the default notification center immediately before the drawer is opened.

## See Also

### Opening and Closing Drawers

- [drawerShouldOpen(_:)](appkit/nsdrawerdelegate/drawershouldopen(_:).md)
- [drawerDidOpen(_:)](appkit/nsdrawerdelegate/drawerdidopen(_:).md)
- [drawerShouldClose(_:)](appkit/nsdrawerdelegate/drawershouldclose(_:).md)
- [drawerWillClose(_:)](appkit/nsdrawerdelegate/drawerwillclose(_:).md)
- [drawerDidClose(_:)](appkit/nsdrawerdelegate/drawerdidclose(_:).md)
