<!--
{
  "availability" : [
    "iOS: 2.0.0 - 8.3.0",
    "iPadOS: 2.0.0 - 8.3.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIActionSheetDelegate/actionSheet(_:clickedButtonAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIActionSheetDelegate(im)actionSheet:clickedButtonAtIndex:"
  },
  "title" : "actionSheet(_:clickedButtonAt:)"
}
-->

# actionSheet(_:clickedButtonAt:)

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

```
optional func actionSheet(_ actionSheet: UIActionSheet, clickedButtonAt buttonIndex: Int)
```

## Parameters

`actionSheet`

The action sheet containing the button.

`buttonIndex`

The position of the clicked button. The button indices start at `0`.

## Discussion

The receiver is automatically dismissed after this method is invoked.

---

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)