Contents

drawerShouldClose(_:)

Asks the delegate if the specified drawer should close.

Declaration

optional func drawerShouldClose(_ sender: NSDrawer) -> Bool

Parameters

  • sender:

    The drawer being closed.

Return Value

true to allow the drawer to close; false to prevent it from closing.

Discussion

This method is invoked on user-initiated attempts to close a drawer by dragging it or when the NSDrawerDelegate method is called.

See Also

Opening and Closing Drawers