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

# init(title:stopButton:secondaryButton:secondaryButtonBehavior:)

Creates an alert for an alarm.

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

## Parameters

`title`

The title of the alert.

`stopButton`

The end button for an alarm.

`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)