Structures

The following structures are available globally.

Background Container View

  • This is a general-purpose View that displays the background gradient, under the contained View.

    See more

    Declaration

    Swift

    @MainActor
    struct AppBackground<Content> : View where Content : View

Main App

  • The main app wrapper.

    See more

    Declaration

    Swift

    @main
    @MainActor
    struct NACC_App : App

Info Screen Display View

Activity (Share) View

  • Simple wrapper around UIActivityViewController so we can use it from SwiftUI.

    See more

    Declaration

    Swift

    @MainActor
    struct NACC_ActivityView : UIViewControllerRepresentable

Calendar Event Maker View

  • Ugh. I hate using UIViewControllerRepresentable, but we need it for this.

    This is how the Event editor is implemented.

    See more

    Declaration

    Swift

    @MainActor
    struct NACC_EventEditView : UIViewControllerRepresentable

Date Picker View

  • This is a view that we use to allow the user to select a new cleandate.

    It shows a standard “graphical” date picker (calendar-style), along with a “DONE” button (dismisses the modal).

    It shows a a “Today” button (sets the calendar to today), if the selected day is not today.

    If the user has changed the date since invoking the screen, a “Reset” button also appears, allowing the user to discard any changes.

    See more

    Declaration

    Swift

    @MainActor
    struct NACC_PickerPopoverContent : View

Special View Modifier for the Date Picker

  • This ViewModifier will present a body containing our special DatePicker.

    See more

    Declaration

    Swift

    @MainActor
    struct NACC_AdaptivePickerPresentation : ViewModifier

Main App View

  • The initial app container View.

    This is the principal view of the app. It is displayed upon startup.

    It contains a textual report of the user’s set cleantime, and the user can tap the report to change their cleandate.

    Below the report, is an image, showing the last keytag (for under a year), or medallion earned by the user, based on their cleandate.

    At the top, is the app logo. Tapping on it (or the keytag/medallion logo) will show another screen, with images displaying multiple keytags or medalliuons.

    See more

    Declaration

    Swift

    @MainActor
    struct NACC_MainContentView : View

Result Display View

Shared Cleantime Image View

  • A reusable View that:

    • Configures an LGV_UICleantimeImageViewBase subclass
    • Waits for it to render into a UIImage
    • Shows a spinner until the image is ready
    See more

    Declaration

    Swift

    @MainActor
    fileprivate struct NACC_CleantimeRenderedImageView : View

Keytag Array View

Keytag Strip View

Medallion Array View