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;