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

# willPresent(_:)

Sent to the delegate before a model view is presented to the user.

## Declaration

```swift
optional func willPresent(_ alertView: UIAlertView)
```

## Parameters

- `alertView`: The alert view that is about to be displayed.

## See Also

### Customizing behavior

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