what is onScrollGeometryChange
Generated on 8/2/2024
1 search
The onScrollGeometryChange
modifier in SwiftUI allows you to performantly react to changes in the geometry of a scroll view. This includes reacting to changes in content offsets, content size, and more. For example, you can use it to detect when a view's visibility has changed due to scrolling, enabling you to create experiences centered around content moving on or off screen, such as auto-playing videos or showing a "back to top" button when you scroll past the top of the scroll view's contents.
For more details, you can refer to the session What’s new in SwiftUI at the timestamp 16:47.
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.
Create custom hover effects in visionOS
Learn how to develop custom hover effects that update views when people look at them. Find out how to build an expanding button effect that combines opacity, scale, and clip effects. Discover best practices for creating effects that are comfortable and respect people’s accessibility needs.
Create custom visual effects with SwiftUI
Discover how to create stunning visual effects in SwiftUI. Learn to build unique scroll effects, rich color treatments, and custom transitions. We’ll also explore advanced graphic effects using Metal shaders and custom text rendering.
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.