---
title: "actionSheet(_:clickedButtonAt:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiactionsheetdelegate/actionsheet(_:clickedbuttonat:)"
---

# actionSheet(_:clickedButtonAt:)

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

## Declaration

```swift
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

Discussion The receiver is automatically dismissed after this method is invoked.
