---
title: "buttonTitle(at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiactionsheet/buttontitle(at:)"
---

# buttonTitle(at:)

Returns the title of the button at the specified index.

## Declaration

```swift
func buttonTitle(at buttonIndex: Int) -> String?
```

## Parameters

- `buttonIndex`: The index of the button. The button indices start at 0.

## Return Value

Return Value The title of the button specified by index buttonIndex.

## See Also

### Related Documentation

- [show(in:)](uikit/uiactionsheet/show(in:).md)

### Configuring buttons

- [addButton(withTitle:)](uikit/uiactionsheet/addbutton(withtitle:).md)
- [numberOfButtons](uikit/uiactionsheet/numberofbuttons.md)
- [cancelButtonIndex](uikit/uiactionsheet/cancelbuttonindex.md)
- [destructiveButtonIndex](uikit/uiactionsheet/destructivebuttonindex.md)
- [firstOtherButtonIndex](uikit/uiactionsheet/firstotherbuttonindex.md)
