VisualInstruction
extension VisualInstruction
-
Returns a
CPImageSetrepresenting the maneuver.Declaration
Swift
@available(iOS 12.0, *) public func maneuverImageSet(side: DrivingSide) -> CPImageSet? -
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
@available(iOS 12.0, *) public func carPlayManeuverLabelAttributedText(bounds: @escaping () -> (CGRect), shieldHeight: CGFloat, window: UIWindow?) -> NSAttributedString?Parameters
boundsA closure that calculates the available bounds for the maneuver text.
shieldHeightThe height of the shield.
windowA
UIWindowthat holds theUIAppearancestyling properties, preferably the CarPlay window.Return Value
An
NSAttributedStringwith maneuver instructions. -
Returns a
CPImageSetrepresenting the maneuver lane configuration.Declaration
Swift
@available(iOS 12.0, *) public func lanesImageSet(side: DrivingSide, direction: ManeuverDirection?, scale: CGFloat) -> CPImageSet?
Install in Dash
VisualInstruction Extension Reference