---
title: "cancel(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nssavepanel/cancel(_:)"
---

# cancel(_:)

The action method that the panel calls when the user clicks the Cancel button.

## Declaration

```swift
@IBAction func cancel(_ sender: Any?)
```

## Parameters

- `sender`: The NSSavePanel object that contains the Cancel button.

## See Also

### Handling Actions

- [ok(_:)](appkit/nssavepanel/ok(_:).md)
