What’s new in scrollview
Asked on 2024-07-30
1 search
In the WWDC 2024 session titled What’s new in SwiftUI, several enhancements to ScrollView were introduced:
- Programmatic Control: You now have more programmatic control over your scroll views, including more scroll positions to programmatically scroll to, such as the top edge.
- Scroll Visibility Change: The new
onScrollVisibilityChangemodifier allows you to detect when a view's visibility changes due to scrolling. This can be used to create experiences centered around content moving on or off screen, like auto-playing videos. - Scroll Geometry Change: The
onScrollGeometryChangemodifier lets you react to changes in content offsets, content size, and more, enabling deeper integration with the state of a scroll view. - Content Alignment and Bouncing: Additional options are available to control content alignment, turn off bouncing along a given axis, and programmatically stop scrolling.
For more detailed examples and advanced techniques, you can refer to the session Migrate your TVML app to SwiftUI, which demonstrates the use of these new scroll view modifiers in tvOS 18.
Additionally, the session Create custom visual effects with SwiftUI explores how to use the scrollTransition modifier to create custom scroll effects, such as parallax effects and unique scroll experiences.
Relevant Sessions:

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.

Elevate your tab and sidebar experience in iPadOS
iPadOS 18 introduces a new navigation system that gives people the flexibility to choose between using a tab bar or sidebar. The newly redesigned tab bar provides more space for content and other functionality. Learn how to use SwiftUI and UIKit to enable customization features – like adding, removing and reordering tabs – to enable a more personal touch in your app.

What’s new in UIKit
Explore everything new in UIKit, including tab and document launch experiences, transitions, and text and input changes. We’ll also discuss better-than-ever interoperability between UIKit and SwiftUI animations and gestures, as well as general improvements throughout UIKit.
