NavigationSettings

public class NavigationSettings

A wrapper for the UserDefaults class for navigation-specific settings.

Properties are prefixed before they are stored in UserDefaults.standard.

To specify criteria when calculating routes, use the NavigationRouteOptions class. To customize the user experience during a particular turn-by-turn navigation session, use the NavigationOptions class when initializing a NavigationViewController.

  • The volume that the voice controller will use.

    This volume is relative to the system’s volume where 1.0 is same volume as the system.

    Declaration

    Swift

    public dynamic var voiceVolume: Float { get set }
  • Specifies whether to mute the voice controller or not.

    Declaration

    Swift

    public dynamic var voiceMuted: Bool { get set }
  • Specifies the preferred distance measurement unit.

    Note

    Anything but kilometer and mile will fall back to the default measurement for the current locale. Meters and feets will be used when the presented distances are small enough. See DistanceFormatter for more information.

    Declaration

    Swift

    public dynamic var distanceUnit: LengthFormatter.Unit { get set }
  • The shared navigation settings object that affects the entire application.

    Declaration

    Swift

    public static let shared: NavigationSettings