---
title: "alertViewShouldEnableFirstOtherButton(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uialertviewdelegate/alertviewshouldenablefirstotherbutton(_:)"
---

# alertViewShouldEnableFirstOtherButton(_:)

Sent to the delegate to determine whether the first non-cancel button in the alert should be enabled.

## Declaration

```swift
optional func alertViewShouldEnableFirstOtherButton(_ alertView: UIAlertView) -> Bool
```

## Parameters

- `alertView`: The alert view that is being configured.

## Return Value

Return Value true if the button should be enabled, no if the button should be disabled.

## See Also

### Customizing behavior

- [willPresent(_:)](uikit/uialertviewdelegate/willpresent(_:).md)
- [didPresent(_:)](uikit/uialertviewdelegate/didpresent(_:).md)
- [alertView(_:willDismissWithButtonIndex:)](uikit/uialertviewdelegate/alertview(_:willdismisswithbuttonindex:).md)
- [alertView(_:didDismissWithButtonIndex:)](uikit/uialertviewdelegate/alertview(_:diddismisswithbuttonindex:).md)
