---
title: "init(image:alignment:)"
framework: carplay
role: symbol
role_heading: Initializer
path: "carplay/cpimageoverlay/init(image:alignment:)"
---

# init(image:alignment:)

Initialize an overlay with a UIImage.

## Declaration

```swift
init(image: UIImage, alignment: CPImageOverlay.Alignment)
```

## Parameters

- `image`: The image to display in the overlay.
- `alignment`: The alignment for positioning the overlay.
