GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSNavigationMutableSpeedometerUIOptions
The mutable class that encapsulates UI configuration for different severities of speed alerts,
represented by GMSNavigationSpeedAlertSeverity
.
-
Sets the color of the speed alert text to use for the specified speed alert severity and lighting
mode.
@note: Attempting to set the color for GMSNavigationSpeedAlertSeverityUnknown
or
GMSNavigationSpeedAlertSeverityNotSpeeding
is a no-op.
-
Sets the speed alert icon background color to use for the specified speed alert severity and
lighting mode.
@note: Attempting to set the color for GMSNavigationSpeedAlertSeverityUnknown
or
GMSNavigationSpeedAlertSeverityNotSpeeding
is a no-op.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSNavigationMutableSpeedometerUIOptions\u003c/code\u003e allows customization of the UI for speed alerts with varying severity levels.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to set the text and background color for speed alerts based on severity and lighting mode.\u003c/p\u003e\n"],["\u003cp\u003eSetting colors for \u003ccode\u003eGMSNavigationSpeedAlertSeverityUnknown\u003c/code\u003e or \u003ccode\u003eGMSNavigationSpeedAlertSeverityNotSpeeding\u003c/code\u003e has no effect.\u003c/p\u003e\n"]]],[],null,["# GoogleNavigation Framework Reference\n\nGMSNavigationMutableSpeedometerUIOptions\n========================================\n\n @interface GMSNavigationMutableSpeedometerUIOptions\n : ../Classes/GMSNavigationSpeedometerUIOptions.html\n\nThe mutable class that encapsulates UI configuration for different severities of speed alerts,\nrepresented by [GMSNavigationSpeedAlertSeverity](../Enums/GMSNavigationSpeedAlertSeverity.html).\n- `\n ``\n ``\n `\n\n ### [-setTextColor:forSpeedAlertSeverity:lightingMode:](#/c:objc(cs)GMSNavigationMutableSpeedometerUIOptions(im)setTextColor:forSpeedAlertSeverity:lightingMode:)\n\n `\n ` \n Sets the color of the speed alert text to use for the specified speed alert severity and lighting\n mode.\n\n @note: Attempting to set the color for `GMSNavigationSpeedAlertSeverityUnknown` or\n `GMSNavigationSpeedAlertSeverityNotSpeeding` is a no-op. \n\n #### Declaration\n\n Swift \n\n func setTextColor(_ color: UIColor, for speedAlertSeverity: ../Enums/GMSNavigationSpeedAlertSeverity.html, lightingMode: ../Enums/GMSNavigationLightingMode.html)\n\n Objective-C \n\n - (void)setTextColor:(nonnull UIColor *)color\n forSpeedAlertSeverity:(../Enums/GMSNavigationSpeedAlertSeverity.html)speedAlertSeverity\n lightingMode:(../Enums/GMSNavigationLightingMode.html)lightingMode;\n\n- `\n ``\n ``\n `\n\n ### [-setBackgroundColor:forSpeedAlertSeverity:lightingMode:](#/c:objc(cs)GMSNavigationMutableSpeedometerUIOptions(im)setBackgroundColor:forSpeedAlertSeverity:lightingMode:)\n\n `\n ` \n Sets the speed alert icon background color to use for the specified speed alert severity and\n lighting mode.\n\n @note: Attempting to set the color for `GMSNavigationSpeedAlertSeverityUnknown` or\n `GMSNavigationSpeedAlertSeverityNotSpeeding` is a no-op. \n\n #### Declaration\n\n Swift \n\n func setBackgroundColor(_ color: UIColor, for speedAlertSeverity: ../Enums/GMSNavigationSpeedAlertSeverity.html, lightingMode: ../Enums/GMSNavigationLightingMode.html)\n\n Objective-C \n\n - (void)setBackgroundColor:(nonnull UIColor *)color\n forSpeedAlertSeverity:(../Enums/GMSNavigationSpeedAlertSeverity.html)speedAlertSeverity\n lightingMode:(../Enums/GMSNavigationLightingMode.html)lightingMode;"]]