What is new with Lists in SwiftUI?
Generated on 7/30/2024
1 search

This post is brought to you by Tailscan,
the best devtool for Tailwind CSS.
What's New with Lists in SwiftUI?
SwiftUI has introduced several enhancements and new features for working with lists. Here are some of the key updates:
-
Custom Views in Lists:
- You can now use custom views within lists, allowing for more advanced constructions such as multiple collections of data organized into sections. This is useful for creating complex list structures, like having separate sections for different categories of data (SwiftUI essentials).
-
View Modifiers for Customization:
- Lists can be customized using view modifiers. For example, you can add swipe actions to each row, which can be used to trigger specific actions like marking an item as favorite or deleting it (SwiftUI essentials).
-
New APIs for Scroll Views:
- SwiftUI now offers more fine-grained control over scroll views. You can react to changes in content offsets, content size, and more using the
onScrollGeometryChange
modifier. This allows for creating dynamic experiences based on the scroll position, such as showing or hiding elements (What’s new in SwiftUI).
- SwiftUI now offers more fine-grained control over scroll views. You can react to changes in content offsets, content size, and more using the
-
Custom Containers:
- You can create custom container views that have the same capabilities as SwiftUI's built-in containers like
List
andPicker
. This includes mixing static and dynamic content, supporting sections, and adding container-specific modifiers (What’s new in SwiftUI).
- You can create custom container views that have the same capabilities as SwiftUI's built-in containers like
-
Improved Accessibility:
- SwiftUI now allows you to attach additional information to built-in accessibility labels without overriding the default labels. This makes it easier to add accessibility features to lists and other views (What’s new in SwiftUI).
-
State-Driven Updates:
- SwiftUI automatically keeps your UI up to date when your view state changes over time. This eliminates the need for boilerplate code and reduces the likelihood of update bugs (SwiftUI essentials).
For a deeper dive into these features, you can check out the following sessions:

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.

SwiftUI essentials
Join us on a tour of SwiftUI, Apple’s declarative user interface framework. Learn essential concepts for building apps in SwiftUI, like views, state variables, and layout. Discover the breadth of APIs for building fully featured experiences and crafting unique custom components. Whether you’re brand new to SwiftUI or an experienced developer, you’ll learn how to take advantage of what SwiftUI has to offer when building great apps.

Demystify SwiftUI containers
Learn about the capabilities of SwiftUI container views and build a mental model for how subviews are managed by their containers. Leverage new APIs to build your own custom containers, create modifiers to customize container content, and give your containers that extra polish that helps your apps stand out.