How to add an ornament to a window or volume in VisionOS

Create an ornament view and in the app, add the ornament to a view within a window group.

Oscar de la Hera Gomez
Written by Oscar de la Hera Gomez
First published on 08/10/2024 at 16:18
Last Updated on 08/13/2024 at 12:16
<p>A flower that represents VisionOS with the text “Ornaments” beneath it.</p>

Create an ornament view and in the app, add the ornament to a view within a window group.

Subscribe

The code for this tutorial can be found in the repository linked below on the 101/window-ornaments branch.

Download Open Source VisionOS Starter Project

Please note that the example provided demonstrates the proof of concept through a window, but the same process could be used to add an ornament to a volume.

Step One: Create the Ornament

<p>A screenshot of Xcode showing a SwiftUI view for an ornament. </p>

Create a SwiftUI view for the ornament.

Step Two: Add the Ornament to a View

<p>A screenshot of XCode showing the VisionOS App showing how we add an ornament to a window or volume.</p>

In the VisionOS App, add the ornament to a view within a window group.

Step Three: Test

<p>A screenshot of the simulator showing an ornament on a window.</p>

Run the app in the simulator and make sure everything works as expected.

Looking to learn more about VisionOS, Spatial Computing, Design and Technology?

Search our blog to learn more about visionOS, spatial computing, design and technology.

Search our Blog

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
SubscribeContact UsVisit our BlogView our ServicesView our Work

Partner with us

We would love to get to know you and see how we can help your organization with its goals and needs.
Let's Talk

Stay Informed

Get occasional updates about our company, research, and product launches.
Subscribe