swiftui geometryReader
Asked on 2025-09-22
1 search
The SwiftUI GeometryReader
is a powerful tool for creating flexible layouts by providing access to the size and position of views. In the context of WWDC 2025, the session titled "Meet SwiftUI spatial layout" discusses the use of GeometryReader
in a 3D context, particularly for VisionOS. The session explains how GeometryReader 3D
has flexible sizing behavior, similar to the 2D version, and can be used to manage width, height, and depth in 3D layouts.
For more details, you can refer to the session Meet SwiftUI spatial layout (04:57) where the use of GeometryReader 3D
is discussed.

Meet SwiftUI spatial layout
Explore new tools for building spatial experiences using SwiftUI. Learn the basics of 3D SwiftUI views on visionOS, customize existing layouts with depth alignments, and use modifiers to rotate and position views in space. Discover how to use spatial containers to align views in the same 3D space, helping you create immersive and engaging apps.

Better together: SwiftUI and RealityKit
Discover how to seamlessly blend SwiftUI and RealityKit in visionOS 26. We’ll explore enhancements to Model3D, including animation and ConfigurationCatalog support, and demonstrate smooth transitions to RealityView. You’ll learn how to leverage SwiftUI animations to drive RealityKit component changes, implement interactive manipulation, use new SwiftUI components for richer interactions, and observe RealityKit changes from your SwiftUI code. We’ll also cover how to use unified coordinate conversion for cross-framework coordinate transformations.

Explore concurrency in SwiftUI
Discover how SwiftUI leverages Swift concurrency to build safe and responsive apps. Explore how SwiftUI uses the main actor by default and offloads work to other actors. Learn how to interpret concurrency annotations and manage async tasks with SwiftUI’s event loop for smooth animations and UI updates. You’ll leave knowing how to avoid data races and write code fearlessly.