---
title: UIHostingOrnament
framework: swiftui
role: symbol
role_heading: Class
path: swiftui/uihostingornament
---

# UIHostingOrnament

A model that represents an ornament suitable for being hosted in UIKit.

## Declaration

```swift
class UIHostingOrnament<Content> where Content : View
```

## Overview

Overview Use a UIHostingOrnament when you want to add ornaments to a UIKit view controller. For example, the following adds a single bottom ornament to the current view controller: self.ornaments = [     UIHostingOrnament(sceneAnchor: .bottom) {         OrnamentContent()     } ]

## Topics

### Creating a hosting ornament

- [init(sceneAnchor:contentAlignment:content:)](swiftui/uihostingornament/init(sceneanchor:contentalignment:content:).md)
- [rootView](swiftui/uihostingornament/rootview.md)

### Setting the alignment

- [contentAlignment](swiftui/uihostingornament/contentalignment.md)
- [sceneAnchor](swiftui/uihostingornament/sceneanchor.md)

### Instance Properties

- [contentAlignment3D](swiftui/uihostingornament/contentalignment3d.md)

## Relationships

### Inherits From

- [UIOrnament](swiftui/uiornament.md)

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Hosting an ornament in UIKit

- [UIOrnament](swiftui/uiornament.md)
