attributedInstructionVariants
An array of attributed instruction variants for the maneuver.
Declaration
var attributedInstructionVariants: [NSAttributedString] { get set }Discussion
Localize each variant for display to the user, and make sure the array has at least one variant. The system displays the first variant that fits into the available screen space, so arrange the variants in order from most- to least-preferred.
The attributed strings in the array can have only a single attribute—an NSTextAttachment. CarPlay removes all other attributes.
Using a text attachment attribute, you can add an image to a maneuver instruction as the example below shows. The maximum text attachment image size is 64 x 16 points.
Listing 1.