<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPNavigationAlert/updateTitleVariants(_:subtitleVariants:avatarImage:alert:actions:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPNavigationAlert(im)updateTitleVariants:subtitleVariants:avatarImage:alertImage:actions:duration:"
  },
  "title" : "updateTitleVariants(_:subtitleVariants:avatarImage:alert:actions:duration:)"
}
-->

# updateTitleVariants(_:subtitleVariants:avatarImage:alert:actions:duration:)

Update the navigation alert with new title variants, subtitle variants, image, actions, and duration.

```
func updateTitleVariants(_ newTitleVariants: [String], subtitleVariants newSubtitleVariants: [String], avatarImage: UIImage?, alert alertImage: UIImage?, actions: [CPAlertAction], duration: TimeInterval)
```

## Parameters

`newTitleVariants`

An updated array of title variants.

`newSubtitleVariants`

An updated array of subtitle variants.

`avatarImage`

An optional updated @c UIImage to display.

`alertImage`

An optional updated @c UIImage to display. Note that this image may be hidden by the system if the available screen space is too small.

`actions`

An updated array of @c CPAlertAction objects. The number of actions will be clamped to @c maximumActionsCount.

`duration`

The updated duration for which this alert should be visible. Specify -1 to keep duration unaltered. Specify 0 for an alert that displays indefinitely.

## Discussion

Updating an alert that has already been dismissed has no effect.

When providing an image, your app should provide a @c UIImage that is display-ready. If necessary for the image, provide
light and dark styles by using an asset from your asset catalog, prepared with light and dark styles
or by using @c UIImageAsset to combine two @c UIImage instances into a single image with
both styles.

UIImageAsset is used to combine multiple UIImages with different trait collections into a single UIImage.

---

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)