AI-generated Key Takeaways
-
GMSNavigationSpeedometerUIOptions
is an immutable class used to customize the UI of speed alerts during navigation. -
It allows customization of the speed alert UI elements, such as text and background colors, for different speed alert severities (minor, major, etc.).
-
It works in conjunction with
GMSNavigationSpeedAlertOptions
which defines the thresholds for triggering each speed alert severity. -
Provides methods to get the text color and background color for different speed alert severities and lighting modes.
GMSNavigationSpeedometerUIOptions
@interface GMSNavigationSpeedometerUIOptions
: NSObject <NSCopying, NSMutableCopying>
An immutable class that encapsulates UI configuration for different severities of speed alerts,
represented by GMSNavigationSpeedAlertSeverity
.
You can use this class to customize the speed alert UI, such as the colors of the font and icon background of minor and major speed alert.
You use GMSNavigationSpeedometerUIOptions
to customize the speed alert UI for different
severities. You must use GMSNavigationSpeedAlertOptions
to define the triggering thresholds
for each severity of speed alert.
-
- Gets the color of the speed alert text to use for the specified speed alert severity and
- lighting mode. *
- @note: This returns
UIColor.clearColor
forGMSNavigationSpeedAlertSeverityUnknown
and GMSNavigationSpeedAlertSeverityNotSpeeding.
Declaration
Swift
func textColor(for speedAlertSeverity: GMSNavigationSpeedAlertSeverity, lightingMode: GMSNavigationLightingMode) -> UIColor
Objective-C
- (nonnull UIColor *)textColorForSpeedAlertSeverity: (GMSNavigationSpeedAlertSeverity)speedAlertSeverity lightingMode:(GMSNavigationLightingMode) lightingMode;
-
- Gets the speed alert icon background color to use for the specified speed alert severity and
- lighting mode. *
- @note: This returns
UIColor.clearColor
forGMSNavigationSpeedAlertSeverityUnknown
and GMSNavigationSpeedAlertSeverityNotSpeeding.
Declaration
Swift
func backgroundColor(for speedAlertSeverity: GMSNavigationSpeedAlertSeverity, lightingMode: GMSNavigationLightingMode) -> UIColor
Objective-C
- (nonnull UIColor *)backgroundColorForSpeedAlertSeverity: (GMSNavigationSpeedAlertSeverity)speedAlertSeverity lightingMode: (GMSNavigationLightingMode) lightingMode;