Contents

AlarmPresentation

An object that describes the content required for the alarm UI.

Declaration

struct AlarmPresentation

Overview

The following example shows how to set different views for an alarm using the AlarmPresentation model.

let alert = AlarmPresentation.Alert(
    title: "Eggs are ready!",
    secondaryButton: AlarmButton(text: "Repeat", textColor: .blue, systemImageName: "repeat"),
    secondaryButtonBehavior: .countdown)

let countdown = AlarmPresentation.Countdown(title: "Eggs are cooking")

let paused = AlarmPresentation.Paused(
    title: "Timer paused",
    resumeButton: AlarmButton(text: "Resume", textColor: .blue, systemImageName: "play.circle"))

let presentation = AlarmPresentation(alert: alert, countdown: countdown, paused: paused)

Topics

Defining the alarm UI

Describing an alarm state

See Also

Views