Structures

The following structures are available globally.

AdView

  • A view that displays a banner ad.

    Note

    Note Ads are displayed 50% of the time. Ads can be disabled in the app settings. In addition, the bid floor setting in Google AdMob is set very high, further reducing the likelihood of an ad being displayed. The goal is to provide a non-intrusive ad experience for the user while still supporting the development of new features and improvements.
    See more

    Declaration

    Swift

    struct AdView : View, Equatable

ChipView

  • A view that displays a chip with an icon and title. Based on MUI Chip

    See more

    Declaration

    Swift

    public struct ChipView : View

ImageBackground

ImageBackgroundWrapper

TopoBackgroundModifier

  • Undocumented

    See more

    Declaration

    Swift

    struct TopoBackgroundModifier : ViewModifier
  • A view that presents a sheet with a title and a close button. This view is intended to be used as a modal sheet.

    See more

    Declaration

    Swift

    struct InfoSheetView<Content> : View where Content : View
  • A view that presents a snackbar with a title and a message.

    See more

    Declaration

    Swift

    public struct Snackbar : Identifiable, Equatable
  • A view that displays a chip with a trend arrow and value.

    See more

    Declaration

    Swift

    public struct TrendChipView : View
  • A view that displays a message, subtitle, and optional action button. This view is intended to be used as a placeholder when no data is available, when data is loading, or when an error occurs.

    See more

    Declaration

    Swift

    public struct UtilityBlockView : View

WebViewContent

  • A view for displaying websites within the app

    See more

    Declaration

    Swift

    struct WebViewContent : UIViewRepresentable

    Parameters

    url

    The URL of the website to display

WebView

GaugeTrend

  • A struct that represents the trend of a gauge metric.

    See more

    Declaration

    Swift

    public struct GaugeTrend

ReadingIdentifier

GaugeAlertRef

  • a reference of a gauge alert used to determine if an alert has been edited

    See more

    Declaration

    Swift

    struct GaugeAlertRef

GaugeWatcherApp

StateValue

  • A struct that represents a state or province.

    See more

    Declaration

    Swift

    struct StateValue : Codable, Equatable, Hashable

GaugeWatcherListModifier

  • A view modifier that applies the default list style for the app.

    See more

    Declaration

    Swift

    struct GaugeWatcherListModifier : ViewModifier

GaugeWatcherListRowModifier

  • A view modifier that applies the default list row style for the app.

    See more

    Declaration

    Swift

    struct GaugeWatcherListRowModifier : ViewModifier

InfoSheetListModifier

PulseEffect

  • A view modifier that applies a pulsing effect to a view. Used by GaugeMap markers.

    See more

    Declaration

    Swift

    struct PulseEffect : ViewModifier

SkeletonTextModifier

  • A view modifier that applies an animated skeleton text style. ie, a gray rectangle with rounded corners while the text is loading.

    See more

    Declaration

    Swift

    struct SkeletonTextModifier : ViewModifier

SnackbarModifier

  • Adds a snackbar overlay to a view. Typically used with tier one (root tab views) containing views.

    See more

    Declaration

    Swift

    struct SnackbarModifier : ViewModifier

TrackTapAction

TrackViewModifier

  • A view modifier that tracks the view in Datadog RUM. See RUM Views

    See more

    Declaration

    Swift

    struct TrackViewModifier : ViewModifier
  • A service for managing background tasks

    Note

    Background tasks are scheduled to run 15 minutes after the app is backgrounded.
    See more

    Declaration

    Swift

    struct BackgroundService

LocalStorageService

  • A service for storing and retrieving data from UserDefaults

    See more

    Declaration

    Swift

    struct LocalStorageService

TemporaryFavoriteGauge

  • Used when migrating and wiping all data and re-seeding. if a user has favorites, wipes all data, then navigates back to Favorites, then tries to go to a detail view, we need the same id (PersistentIdentifier) and siteID.

    See more

    Declaration

    Swift

    struct TemporaryFavoriteGauge : Codable, Hashable
  • Undocumented

    See more

    Declaration

    Swift

    struct PromptService : ViewModifier
  • Methods for interacting with the StoreKit framework.

    See more

    Declaration

    Swift

    struct StoreKitService

DeepLink

  • An object representing a deep link. "gaugewatcher://open-gauge?country=\(country)&state=\(state)&siteID=\(siteID)" is the format of a deep link for opening a gauge detail view.

    See more

    Declaration

    Swift

    struct DeepLink : CustomStringConvertible

RecentGauge

  • Undocumented

    See more

    Declaration

    Swift

    struct RecentGauge : Codable, Identifiable
  • A button style that displays an outlined button.

    See more

    Declaration

    Swift

    public struct OutlinedButtonStyle : ButtonStyle

AppView

FavoriteGaugeListRow

GaugeAlertsList

GaugeAlertRow

ForecastView

CleanedForecast

  • Undocumented

    See more

    Declaration

    Swift

    struct CleanedForecast : Identifiable
  • A view that displays the coordinates of a gauge station as a tapable label to copy the coordinates to the clipboard

    • latitude: The latitude of the gauge station
    • longitude: The longitude of the gauge station
    See more

    Declaration

    Swift

    struct GaugeCoordinatesView : View

GaugeDetail

  • A view that displays the details of a gauge station

    See more

    Declaration

    Swift

    struct GaugeDetail : View
  • A header view for the gauge detail screen Displays the gauge name and an info button

    See more

    Declaration

    Swift

    struct GaugeDetailHeader : View
  • Undocumented

    See more

    Declaration

    Swift

    struct GaugeDetailInfoSheet : View
  • A button that toggles the favorite status of a gauge

    • gaugeID: The ID of the gauge to toggle
    See more

    Declaration

    Swift

    struct GaugeFavoriteToggle : View

GaugeMap

  • A view that displays a map of a gauge and nearby gauges.

    See more

    Declaration

    Swift

    struct GaugeMap : View
  • A view that displays navigation controls for a gauge’s subviews; source, map, and weather.

    • gauge: The gauge to display navigation controls for
    See more

    Declaration

    Swift

    struct GaugeNavigationControls : View

GaugeReadingChart

  • A chart view that displays gauge readings

    • siteID: The ID of the site to display readings for
    See more

    Declaration

    Swift

    struct GaugeReadingChart : View
  • A button that shares a gauge’s deep link

    See more

    Declaration

    Swift

    struct GaugeShareButton : View
  • A sheet that displays the source of a gauge

    • gauge: The gauge to display the source for
    • onClose: A closure to call when the sheet is closed

    Note

    This view is only available for USGS gauges.
    See more

    Declaration

    Swift

    struct GaugeSourceSheet : View
  • A view that displays the last updated time and the time until the next refresh

    See more

    Declaration

    Swift

    struct LastUpdatedView : View

WeatherView

FavoriteGaugeTile

GaugeMapMarker

GaugeSearch

GaugeSearchSheet

SearchListRow

SearchView

  • Undocumented

    See more

    Declaration

    Swift

    struct SearchView : View
  • Undocumented

    See more

    Declaration

    Swift

    struct AdvertisingView : View
  • A view that displays the legal information in a web view.

    See more

    Declaration

    Swift

    struct LegalView : View
  • A view that displays GaugeSearchMap settings.

    See more

    Declaration

    Swift

    struct MapSettings : View
  • A view that displays the privacy policy in a web view.

    See more

    Declaration

    Swift

    struct PrivacyView : View
  • A view that displays the app settings. Screens available in the settings view:

    • Permissions
    • Developer Feedback
    • Legal
    • Privacy Policy
    See more

    Declaration

    Swift

    struct SettingsView : View
  • Undocumented

    See more

    Declaration

    Swift

    struct SystemStatusView : View