Contents

AlarmAttributes

An object that contains all information necessary for the alarm UI.

Declaration

struct AlarmAttributes<Metadata> where Metadata : AlarmMetadata

Overview

This struct includes alerting, countdown, and paused states. You define all the alarm information when creating the attributes. When archiving the widget, the widget extension selects which state to display based on the AlarmPresentationState provided in the activity content state payload. The following example defines the attributes for the alarm UI.

let attributes = AlarmAttributes(
    presentation: presentation,
    metadata: metadata,
    tintColor: Color.white)

Topics

Creating an alarm attribute

Decoding and encoding

See Also

Views