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

# drawerWillClose(_:)

Notifies the delegate the drawer will close.

## Declaration

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

## Parameters

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

## See Also

### Opening and Closing Drawers

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