<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPManeuver/attributedInstructionVariants",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPManeuver(py)attributedInstructionVariants"
  },
  "title" : "attributedInstructionVariants"
}
-->

# attributedInstructionVariants

An array of attributed instruction variants for the maneuver.

```
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.

> Note:
> If you provide both ``doc://com.apple.carplay/documentation/CarPlay/CPManeuver/instructionVariants`` and ``doc://com.apple.carplay/documentation/CarPlay/CPManeuver/attributedInstructionVariants``, the system displays instructions from the attributed instruction variants array.

The attributed strings in the array can have only a single attribute—an <doc://com.apple.documentation/documentation/UIKit/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.

```swift
let instruction = NSMutableAttributedString(string: "Turn right on Apple Park Way")

// Attach an image.
let image = UIImage(systemName: "arrow.turn.up.right")!
let attachment = NSTextAttachment(image: image)
let container = NSAttributedString(attachment: attachment)

instruction.append(container)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)