• Returns a CPImageSet representing the maneuver.

    Declaration

    Swift

    public func maneuverImageSet(side: DrivingSide) -> CPImageSet?

    Parameters

    side

    Driving side of the road cars and traffic flow.

    Return Value

    An image set with light and dark versions of an image.

  • Returns whether the VisualInstruction’s maneuver image should be flipped according to the driving side.

    Declaration

    Swift

    public func shouldFlipImage(side: DrivingSide) -> Bool
  • Glanceable instruction given the available space, appearance styling, and attachments.

    Declaration

    Swift

    public func carPlayManeuverLabelAttributedText<T: InstructionLabel>(bounds: @escaping () -> (CGRect),
                                                                        shieldHeight: CGFloat,
                                                                        window: UIWindow?,
                                                                        traitCollection: UITraitCollection? = nil,
                                                                        instructionLabelType: T.Type? = nil) -> NSAttributedString?

    Parameters

    bounds

    A closure that calculates the available bounds for the maneuver text.

    shieldHeight

    The height of the shield.

    window

    A UIWindow that holds the UIAppearance styling properties, preferably the CarPlay window.

    traitCollection

    Custom UITraitCollection that is used to control color of the shield icons depending on various custom situations when actual trait collection is different (e.g. when driving through the tunnel).

    instructionLabelType

    Type, which is inherited from InstructionLabel and will be used for showing a visual instruction.

    Return Value

    An NSAttributedString with maneuver instructions.

  • Returns a CPImageSet representing the maneuver lane configuration.

    Declaration

    Swift

    public func lanesImageSet(side: DrivingSide,
                              direction: ManeuverDirection?,
                              scale: CGFloat) -> CPImageSet?

    Parameters

    side

    Indicates which side of the road cars and traffic flow.

    direction

    ManeuverType that contains directional information.

    scale

    The natural scale factor associated with the CarPlay screen.

    Return Value

    Light and dark representations of an image that contains maneuver lane configuration.