VisionOS swiftui new elements
Generated on 7/30/2024
1 search

This post is brought to you by Tailscan,
the best devtool for Tailwind CSS.
VisionOS SwiftUI New Elements
Sessions Mentioned:
Key Points:
-
Standard System Appearance:
- SwiftUI components like
TabView
and sheets automatically adopt the standard system appearance in visionOS. - Standard components translate well to visionOS, ensuring a consistent look and feel.
- SwiftUI components like
-
Dynamic Resizing:
- New SwiftUI API:
onGeometryChange
allows observing changes in view size. - This can be used to dynamically resize charts and other elements, enhancing the user experience on the spatial canvas of visionOS.
- New SwiftUI API:
-
New Graphics Capabilities:
- SwiftUI introduces a new
mix
modifier onColor
to blend colors. - Custom shaders can now be precompiled to avoid frame drops.
- SwiftUI introduces a new
-
Scroll View Enhancements:
- New APIs provide fine-grained control over scroll views.
onScrollGeometryChange
allows reacting to changes in content offsets and sizes.- Visibility detection for views due to scrolling, enabling experiences like auto-playing videos.
-
Volumetric Content:
- SwiftUI supports adding volumetric content for visionOS, leveraging the spatial canvas to create immersive experiences.
-
Custom Layouts and Controls:
- SwiftUI provides low-level APIs for creating custom control styles, layouts, and even applying custom Metal shaders directly to views.
Relevant Timestamps:
- Get started with HealthKit in visionOS (05:14)
- What’s new in SwiftUI (15:56)
- SwiftUI essentials (19:37)
These sessions provide a comprehensive overview of the new elements and capabilities introduced in SwiftUI for visionOS, enhancing both the visual and interactive aspects of your applications.

Migrate your TVML app to SwiftUI
SwiftUI helps you build great apps on all Apple platforms and is the preferred toolkit for bringing your content into the living room with tvOS 18. Learn how to use SwiftUI to create familiar layouts and controls from TVMLKit, and get tips and best practices.

SwiftUI essentials
Join us on a tour of SwiftUI, Apple’s declarative user interface framework. Learn essential concepts for building apps in SwiftUI, like views, state variables, and layout. Discover the breadth of APIs for building fully featured experiences and crafting unique custom components. Whether you’re brand new to SwiftUI or an experienced developer, you’ll learn how to take advantage of what SwiftUI has to offer when building great apps.

What’s new in SwiftUI
Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.

Get started with HealthKit in visionOS
Discover how to use HealthKit to create experiences that take full advantage of the spatial canvas. Learn the capabilities of HealthKit on the platform, find out how to bring an existing iPadOS app to visionOS, and explore the special considerations governing HealthKit during a Guest User session. You’ll also learn ways to use SwiftUI, Swift Charts, and Swift concurrency to craft innovative experiences with HealthKit.

Catch up on accessibility in SwiftUI
SwiftUI makes it easy to build amazing experiences that are accessible to everyone. We’ll discover how assistive technologies understand and navigate your app through the rich accessibility elements provided by SwiftUI. We’ll also discuss how you can further customize these experiences by providing more information about your app’s content and interactions by using accessibility modifiers.