stopButton
TypeScriptget stopButton(): AlarmButtonSwift declarationvar stopButton: AlarmButton { get set }The appearance of the stop button.
struct · iOS 26.0+ · SDK 27.1
struct AlertAn object that describes the UI of the alert that appears when an alarm fires. `Alert` configures the title and buttons in the alarm UI. The system provides a stop button automatically. Use this object to optionally define a secondary button and its behavior. The code snippet below describes how to configure an `Alert` with a secondary button. ```swift let alert = AlarmPresentation.Alert( title: "Eggs are ready!", secondaryButton: AlarmButton(text: "Repeat", textColor: .blue, systemImageName: "repeat"), secondaryButtonBehavior: .countdown) ```
get stopButton(): AlarmButtonSwift declarationvar stopButton: AlarmButton { get set }The appearance of the stop button.
set stopButton(value: AlarmButton)Swift declarationvar stopButton: AlarmButton { get set }The appearance of the stop button.
get secondaryButton(): (AlarmButton) | nullSwift declarationvar secondaryButton: AlarmButton?The appearance of the secondary button. If you use `nil`, the secondary button is omitted.
set secondaryButton(value: (AlarmButton) | null)Swift declarationvar secondaryButton: AlarmButton?The appearance of the secondary button. If you use `nil`, the secondary button is omitted.
get secondaryButtonBehavior(): (AlarmPresentation_Alert_SecondaryButtonBehavior) | nullSwift declarationvar secondaryButtonBehavior: AlarmPresentation.Alert.SecondaryButtonBehavior?The defined behavior of the second button. You can define the button to switch back to a countdown for a snoozed alarm or repeating timer, or execute an intent without mutating the alarm state.
set secondaryButtonBehavior(value: (AlarmPresentation_Alert_SecondaryButtonBehavior) | null)Swift declarationvar secondaryButtonBehavior: AlarmPresentation.Alert.SecondaryButtonBehavior?The defined behavior of the second button. You can define the button to switch back to a countdown for a snoozed alarm or repeating timer, or execute an intent without mutating the alarm state.
get title(): _Foundation_LocalizedStringResourceSwift declarationvar title: LocalizedStringResourceThe title of the alert.
set title(value: _Foundation_LocalizedStringResource)Swift declarationvar title: LocalizedStringResourceThe title of the alert.
static initTitleStopButtonSecondaryButtonSecondaryButtonBehavior(title: _Foundation_LocalizedStringResource, stopButton: AlarmButton, secondaryButton?: (AlarmButton) | null, secondaryButtonBehavior?: (AlarmPresentation_Alert_SecondaryButtonBehavior) | null): AlarmPresentation_AlertSwift declarationinit(title: LocalizedStringResource, stopButton: AlarmButton, secondaryButton: AlarmButton? = nil, secondaryButtonBehavior: AlarmPresentation.Alert.SecondaryButtonBehavior? = nil)Creates an alert for an alarm. - 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.
static initTitleSecondaryButtonSecondaryButtonBehavior(title: _Foundation_LocalizedStringResource, secondaryButton?: (AlarmButton) | null, secondaryButtonBehavior?: (AlarmPresentation_Alert_SecondaryButtonBehavior) | null): AlarmPresentation_AlertSwift declarationinit(title: LocalizedStringResource, secondaryButton: AlarmButton? = nil, secondaryButtonBehavior: AlarmPresentation.Alert.SecondaryButtonBehavior? = nil)Creates an alert for an alarm, with a system-provided stop control and optionally a second button. - Parameters: - title: The title of the alert. - secondaryButton: The customizable second button for an alarm. - secondaryButtonBehavior: The defined behavior of the secondary button.
No declarations were skipped in this snapshot.