<!--
{
  "availability" : [
    "iOS: 26.1.0 -",
    "iPadOS: 26.1.0 -",
    "macCatalyst: 26.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AlarmKit",
  "identifier" : "/documentation/AlarmKit/AlarmPresentation/Alert-swift.struct/init(title:secondaryButton:secondaryButtonBehavior:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AlarmKit"
    ],
    "preciseIdentifier" : "s:8AlarmKit0A12PresentationV5AlertV5title15secondaryButton0fG8BehaviorAE10Foundation23LocalizedStringResourceV_AA0aG0VSgAE09SecondarygH0OSgtcfc"
  },
  "title" : "init(title:secondaryButton:secondaryButtonBehavior:)"
}
-->

# init(title:secondaryButton:secondaryButtonBehavior:)

Creates an alert for an alarm, with a system-provided stop control and optionally a second button.

```
init(title: LocalizedStringResource, secondaryButton: AlarmButton? = nil, secondaryButtonBehavior: AlarmPresentation.Alert.SecondaryButtonBehavior? = nil)
```

## Parameters

`title`

The title of the alert.

`secondaryButton`

The customizable second button for an alarm.

`secondaryButtonBehavior`

The defined behavior of the secondary button.

---

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)