what's new in ScrollView
Generated on 8/2/2024
1 search
What's New in ScrollView
SwiftUI Enhancements
In the session What’s new in SwiftUI, several new features and improvements for 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 Positions: There are additional scroll positions available, allowing for more precise control.
- Content Alignment: You can control content alignment more effectively.
- Bouncing Control: You can turn off bouncing along a given axis.
- Stopping Scrolling: Programmatically stop scrolling when needed.
- Visibility Detection: Detect when a view's visibility changes due to scrolling, enabling experiences like auto-playing videos when they come into view.
- Scroll Geometry Change: The
onScrollGeometryChange
modifier allows you to react to changes in content offsets, content size, and more.
TVOS Enhancements
In the session Migrate your TVML app to SwiftUI, new ScrollView
modifiers specific to tvOS 18 were highlighted:
- On Scroll Visibility Change: This modifier can be used to change the state when a header section scrolls off-screen.
- Scroll Target Behavior: Set the scroll target behavior to be view-aligned to make transitions more definite.
Custom Visual Effects
In the session Create custom visual effects with SwiftUI, custom scroll effects were demonstrated:
- Scroll Transition Modifier: This modifier can be used to create unique scroll effects, such as changing the x-offset of an image to create a parallax effect.
- Custom Scroll Experiences: The
scrollTransition
modifier allows for manipulating content in various ways, such as rotating or offsetting elements based on their scroll position.
Relevant Sessions
These sessions provide a comprehensive overview of the new features and enhancements in ScrollView
across different platforms and use cases.
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.
Platforms State of the Union
Discover the newest advancements on Apple platforms.
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.
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.