<!--
{
  "availability" : [
    "iOS: 2.0.0 - 8.3.0",
    "iPadOS: 2.0.0 - 8.3.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIActionSheet/init(title:delegate:cancelButtonTitle:destructiveButtonTitle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIActionSheet(im)initWithTitle:delegate:cancelButtonTitle:destructiveButtonTitle:otherButtonTitles:"
  },
  "title" : "init(title:delegate:cancelButtonTitle:destructiveButtonTitle:)"
}
-->

# init(title:delegate:cancelButtonTitle:destructiveButtonTitle:)

Initializes the action sheet using the specified starting parameters.

```
init(title: String?, delegate: (any UIActionSheetDelegate)?, cancelButtonTitle: String?, destructiveButtonTitle: String?)
```

## Parameters

`title`

A string to display in the title area of the action sheet. Pass `nil` if you don’t want to display any text in the title area.

`delegate`

The receiver’s delegate object. Although this parameter may be `nil`, the delegate is used to respond to taps in the action sheet and should usually be provided.

`cancelButtonTitle`

The title of the cancel button. This button is added to the action sheet automatically and assigned an appropriate index, which is available from the [`cancelButtonIndex`](/documentation/UIKit/UIActionSheet/cancelButtonIndex) property. This button is displayed in black to indicate that it represents the cancel action. Specify `nil` if you don’t want a cancel button or are presenting the action sheet on an iPad.

`destructiveButtonTitle`

The title of the destructive button. This button is added to the action sheet automatically and assigned an appropriate index, which is available from the [`destructiveButtonIndex`](/documentation/UIKit/UIActionSheet/destructiveButtonIndex) property. This button is displayed in red to indicate that it represents a destructive behavior. Specify `nil` if you don’t want a destructive button.

## Return Value

A newly initialized action sheet.

## Discussion

The action sheet automatically sets the appearance of the destructive and cancel buttons. If the action sheet contains only one button, it doesn’t apply the custom colors associated with the destructive and cancel buttons.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)