CarPlayNavigationViewController

@MainActor
open class CarPlayNavigationViewController : UIViewController, BuildingHighlighting
extension CarPlayNavigationViewController: StyleManagerDelegate
extension CarPlayNavigationViewController: NavigationServiceDelegate
extension CarPlayNavigationViewController: NavigationMapViewDelegate
extension CarPlayNavigationViewController: CPSessionConfigurationDelegate
extension CarPlayNavigationViewController: CPListTemplateDelegate

CarPlayNavigationViewController is a fully-featured turn-by-turn navigation UI for CarPlay.

  • A view indicating what direction the vehicle is traveling towards, snapped to eight cardinal directions in steps of 45°.

    This view is hidden by default.

    Declaration

    Swift

    @MainActor
    public var compassView: CarPlayCompassView!
  • A view that displays the current speed limit.

    Declaration

    Swift

    @MainActor
    public var speedLimitView: SpeedLimitView!
  • A view that displays the current road name.

    Declaration

    Swift

    @MainActor
    public var wayNameView: WayNameView!
  • The interface styles available for display.

    These are the styles available to the view controller’s internal StyleManager object. In CarPlay, Style objects primarily affect the appearance of the map, not guidance-related overlay views.

    Declaration

    Swift

    @MainActor
    public var styles: [Style] { get set }
  • Controls whether the main route style layer and its casing disappears as the user location puck travels over it. Defaults to false.

    If true, the part of the route that has been traversed will be rendered with full transparency, to give the illusion of a disappearing route. To customize the color that appears on the traversed section of a route, override the traversedRouteColor property for the NavigationMapView.appearance().

    Declaration

    Swift

    @MainActor
    public var routeLineTracksTraversal: Bool { get set }
  • Toggles displaying alternative routes.

    If enabled, view will draw actual alternative route lines on the map. Default value is true.

    Declaration

    Swift

    @MainActor
    public var showsContinuousAlternatives: Bool { get set }
  • A Boolean value that determines whether the map annotates the intersections on current step during active navigation.

    If true, the map would display an icon of a traffic control device on the intersection, such as traffic signal, stop sign, yield sign, or railroad crossing. Defaults to true.

    Declaration

    Swift

    @MainActor
    public var annotatesIntersectionsAlongRoute: Bool { get set }
  • AlternativeRoutes user might take during this trip to reach the destination using another road.

    Array contents are updated automatically duting the trip. Alternative routes may be slower or longer then the main route. To get updates, subscribe to Notification.Name.routeControllerDidUpdateAlternatives notification.

    Declaration

    Swift

    @MainActor
    public var continuousAlternatives: [AlternativeRoute] { get }
  • Controls whether night style will be used whenever traversing through a tunnel. Defaults to true.

    Declaration

    Swift

    @MainActor
    public var usesNightStyleWhileInTunnel: Bool
  • Controls the styling of CarPlayNavigationViewController and its components.

    The style can be modified programmatically by using StyleManager.applyStyle(type:).

    Declaration

    Swift

    @MainActor
    public private(set) var styleManager: StyleManager? { get }
  • Allows to control highlighting of the destination building on arrival. By default destination buildings will not be highlighted.

    Declaration

    Swift

    @MainActor
    public var waypointStyle: WaypointStyle