What are some scrollview changes since WW23
Asked on 12/31/2024
1 search
Since WWDC 2023, there have been several changes to ScrollView in SwiftUI, as highlighted in the sessions from WWDC 2024:
-
Programmatic Control: You now have more programmatic control over your ScrollView, including the ability to scroll to more positions like the top edge. This allows for a more customized scrolling experience.
-
Scroll Positions and Alignment: There are new options for controlling content alignment and scroll positions, such as turning off bouncing along a given axis and programmatically stopping scrolling.
-
Visibility and Geometry Changes: New modifiers like
onScrollVisibilityChange
andonScrollGeometryChange
allow you to react to changes in content visibility and geometry, enabling experiences like auto-playing videos when content moves on or off the screen. -
Custom Scroll Effects: The
scrollTransition
modifier can be used to create unique scroll effects, such as parallax effects, by manipulating content based on scroll values. -
View Modifiers in tvOS 18: Specific to tvOS 18, new view modifiers for ScrollView allow for actions like removing a background image when a header section scrolls off-screen.
For more detailed information, you can refer to the session What’s new in SwiftUI (16:18) and Create custom visual effects with SwiftUI (01:29).

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 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.

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.