<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIActionSheetDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIActionSheetDelegate"
  },
  "title" : "UIActionSheetDelegate"
}
-->

# UIActionSheetDelegate

The interface for the delegate of an action sheet object.

```
@MainActor protocol UIActionSheetDelegate : NSObjectProtocol
```

## Overview

The delegate implements the button actions and any other custom behavior. Some of the methods defined in this protocol are optional.

If you add your own buttons or customize the behavior of an action sheet, implement a delegate conforming to this protocol to handle the corresponding delegate messages. Use the [`delegate`](/documentation/UIKit/UIActionSheet/delegate) property of the action sheet object to specify one of your application objects as the delegate.

If you add your own buttons to an action sheet, the delegate must implement the [`actionSheet(_:clickedButtonAt:)`](/documentation/UIKit/UIActionSheetDelegate/actionSheet(_:clickedButtonAt:)) message to respond when those buttons are clicked; otherwise, your custom buttons do nothing. The action sheet is automatically dismissed after the [`actionSheet(_:clickedButtonAt:)`](/documentation/UIKit/UIActionSheetDelegate/actionSheet(_:clickedButtonAt:)) delegate method is invoked.

Optionally, you can implement the [`actionSheetCancel(_:)`](/documentation/UIKit/UIActionSheetDelegate/actionSheetCancel(_:)) method to take the appropriate action when the system cancels your action sheet. If the delegate does not implement this method, the default behavior is to simulate the user clicking the cancel button and closing the view.

You can also optionally augment the behavior of presenting and dismissing action sheets using the methods in Customizing behavior.

## Topics

### Responding to actions

[`-  actionSheet:clickedButtonAtIndex:`](/documentation/UIKit/UIActionSheetDelegate/actionSheet(_:clickedButtonAt:))

Sent to the delegate when the user clicks a button on an action sheet.

### Customizing behavior

[`-  willPresentActionSheet:`](/documentation/UIKit/UIActionSheetDelegate/willPresent(_:))

Sent to the delegate before an action sheet is presented to the user.

[`-  didPresentActionSheet:`](/documentation/UIKit/UIActionSheetDelegate/didPresent(_:))

Sent to the delegate after an action sheet is presented to the user.

[`-  actionSheet:willDismissWithButtonIndex:`](/documentation/UIKit/UIActionSheetDelegate/actionSheet(_:willDismissWithButtonIndex:))

Sent to the delegate before an action sheet is dismissed.

[`-  actionSheet:didDismissWithButtonIndex:`](/documentation/UIKit/UIActionSheetDelegate/actionSheet(_:didDismissWithButtonIndex:))

Sent to the delegate after an action sheet is dismissed from the screen.

### Canceling

[`-  actionSheetCancel:`](/documentation/UIKit/UIActionSheetDelegate/actionSheetCancel(_:))

Sent to the delegate before an action sheet is canceled.

## Relationships

### Inherits From

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

### Conforming Types

[`UIDocumentInteractionController`](/documentation/UIKit/UIDocumentInteractionController)

---

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)