<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPImageOverlay/init(image:alignment:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPImageOverlay(im)initWithImage:alignment:"
  },
  "title" : "init(image:alignment:)"
}
-->

# init(image:alignment:)

Initialize an overlay with a UIImage.

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

## Parameters

`image`

The image to display in the overlay.

`alignment`

The alignment for positioning the overlay.

---

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)