wwdc2025 , swiftui 有哪些更新?
Asked on 06/12/2025
1 search
在WWDC 2025上,SwiftUI有许多令人兴奋的更新和改进。以下是一些主要的更新:
-
性能改进:SwiftUI的性能得到了显著提升,特别是在列表和滚动方面。比如,在macOS上,超过10万个项目的列表加载速度提高了6倍,更新速度提高了16倍。更大的列表会有更大的性能提升。
-
新API和功能:
- Web内容支持:SwiftUI现在可以通过WebKit的全套API直接在应用中嵌入Web内容。
- 富文本编辑:SwiftUI的文本编辑器现在支持富文本编辑,只需将文本编辑器的绑定从字符串更改为AttributedString。
- 3D图表:Swift Charts现在支持3D图表,允许用户从各个角度旋转和缩放图表。
-
设计更新:引入了新的设计系统,提供了一种明亮且流畅的体验,适用于所有Apple平台。
-
小部件和CarPlay:小部件现在可以在Vision OS和CarPlay上使用,并且有新的API用于WatchOS上的相关性。
-
空间应用:SwiftUI在构建空间应用时有更多新功能,包括创建更丰富的3D布局和使用空间容器对齐视图。
-
其他改进:包括更灵活的Swift Data,模型子类化,实体继承,以及对更多常见数据类型的支持。
这些更新使得SwiftUI成为构建现代用户界面的更强大工具,适用于所有Apple平台。要了解更多详细信息,可以查看What's new in SwiftUI和Platforms State of the Union等相关会话。

Platforms State of the Union
Discover the newest advancements on Apple platforms.

What’s new in SwiftUI
Learn what’s new in SwiftUI to build great apps for any Apple platform. We’ll explore how to give your app a brand new look and feel with Liquid Glass. Discover how to boost performance with framework enhancements and new instruments, and integrate advanced capabilities like web content and rich text editing. We’ll also show you how SwiftUI is expanding to more places, including laying out views in three dimensions.

Welcome to WWDC25
There’s so much to dive into at WWDC25. Here’s a quick guide to help get you started.