<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDrawerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSDrawerDelegate"
  },
  "title" : "NSDrawerDelegate"
}
-->

# NSDrawerDelegate

A set of methods that drawer delegates implement to open, close, and resize the drawer.

```
protocol NSDrawerDelegate : NSObjectProtocol
```

## Topics

### Opening and Closing Drawers

[`-  drawerShouldOpen:`](/documentation/AppKit/NSDrawerDelegate/drawerShouldOpen(_:))

Asks the delegate if the specified drawer should open.

[`-  drawerWillOpen:`](/documentation/AppKit/NSDrawerDelegate/drawerWillOpen(_:))

Notifies the delegate that the drawer will open.

[`-  drawerDidOpen:`](/documentation/AppKit/NSDrawerDelegate/drawerDidOpen(_:))

Notifies the delegate that the drawer has opened.

[`-  drawerShouldClose:`](/documentation/AppKit/NSDrawerDelegate/drawerShouldClose(_:))

Asks the delegate if the specified drawer should close.

[`-  drawerWillClose:`](/documentation/AppKit/NSDrawerDelegate/drawerWillClose(_:))

Notifies the delegate the drawer will close.

[`-  drawerDidClose:`](/documentation/AppKit/NSDrawerDelegate/drawerDidClose(_:))

Notifies the delegate that the drawer has closed.

### Managing Drawer Size

[`-  drawerWillResizeContents:toSize:`](/documentation/AppKit/NSDrawerDelegate/drawerWillResizeContents(_:to:))

Invoked when the user resizes the drawer or parent.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)