Structures
The following structures are available globally.
-
This file implements a user-configurable widget that displays the cleantime set in the main app.
The display can be just the textual cleantime report, the highest keytag collected, or keytags (before 1 year), and medallions (after one year).
It can also combine the text with the keytag, by displaying the
systemMedium
family variant. If we display thesystemSmall
variant, then it can only be one of the above choices.The widget dynamically adjusts to whatever cleantime is set in the main app, and updates in realtime.
The widget will, by default, display against a yellow gradient (the same one in the app icon), but that can be switched off, in the widget configuration, to use the standard color theme.
See moreDeclaration
Swift
@main @MainActor struct NACCWidgetBundle : WidgetBundle
-
This builds the view for the displayed widget. It reads the configuration, and generates a view that will be crafted to match the configuration.
See moreDeclaration
Swift
@MainActor struct NACCWidget : Widget
-
This describes the intent, used to build and read the “Edit Widget” screen.
See moreDeclaration
Swift
struct NACC_IntentProvider : AppIntentTimelineProvider
-
This is the display for a single widget entry.
See moreDeclaration
Swift
@MainActor struct NACCWidgetEntryView : View
-
This controls the intent for the settings screen.
See moreDeclaration
Swift
struct NACCWidgetIntent : WidgetConfigurationIntent
-
This is one data entry for the widget. There will only be one, and it should reflect the current state.
See moreDeclaration
Swift
struct NACC_Entry : TimelineEntry