swftui 有什麼新的元件可以用?
Asked on 06/12/2025
1 search
在 WWDC 上,SwiftUI 引入了一些新的元件和功能:
-
自定义容器视图:你现在可以创建自己的自定义容器视图。新的 API 允许你迭代给定视图的子视图,并为每个子视图提供自定义的外观和行为。What’s new in SwiftUI
-
滚动视图增强:SwiftUI 提供了更细致的滚动视图控制。你可以检测视图的可见性变化,并对内容的滚动进行反应。What’s new in SwiftUI
-
新的图形能力:引入了新的颜色混合功能和自定义着色器功能,允许在首次使用前预编译着色器,以避免因懒惰着色器编译导致的帧丢失。What’s new in SwiftUI
-
Web 内容支持:SwiftUI 现在支持嵌入 Web 内容,提供了新的 WebView 组件和 Web Page API。Platforms State of the Union
-
丰富的文本编辑和 3D 图表:引入了新的富文本编辑功能和 3D 图表支持,提升了应用的表现能力。Platforms State of the Union
这些更新使得 SwiftUI 更加灵活和强大,适用于构建各种类型的应用。

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.

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.

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