---
title: numberOfButtons
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiactionsheet/numberofbuttons
---

# numberOfButtons

The number of buttons on the action sheet.

## Declaration

```swift
var numberOfButtons: Int { get }
```

## See Also

### Configuring buttons

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