At WWDC 2025, Apple unveiled the latest iteration of its declarative UI framework, SwiftUI, featuring two major additions: a new SwiftUI-native WebView
type and support for rich-text editing within TextView controls. The update also brings a plethora of additional improvements and new performance tools.
The new WebView
type displays HTML, CSS, and JavaScript content within an app. By default, the view provides a familiar browsing experience, including support for navigating between web pages using links, and forward and back buttons. However, you can fully customize navigation behavior by associating a WebView
with a WebPage
. This is an @Observable
class that exposes web content properties and allows tracking changes to them. For example, you can track when a page is fully loaded observing currentNavigationEvent
.
To make rich-text editing easy to implement, SwiftUI in iOS 26 extends the TextEditor
view with support for AttributedString
. As Apple demonstrated at WWDC, enabling rich-text editing is as simple as changing the type of the bound state passed to TextEditor
during initialization:
struct RichEditorView: View {
@State private var text = AttributedString()
var body: some View {
TextEditor(text: $text)
}
}
Apple has provided a code sample that developers can use to explore the full range of capabilities, including adding custom controls and limiting the formatting options available in the editor.
A new macro, @Animatable
, simplifies animating views, view modifiers, text renderers, shapes, and other structs or classes. It automatically synthesizes conformance to the Animatable
protocol by implementing the animatableData
property based on the animatable properties declared in the type. For instance, you can use it like shown below to animate the width
and angle
properties while excluding non-animatable properties like isOpaque
:
@Animatable
struct CoolShape: Shape {
var width: CGFloat
var angle: Angle
@AnimatableIgnored var isOpaque: Bool
// ...
}
Several additions benefit developers working with both UIKit and SwiftUI. Notably, the new UIHostingSceneDelegate
class enables bridging SwiftUI scenes into UIKit, much like how UIHostingController
allows managing a SwiftUI view. This extends integration capabilities to full scenes, not just individual views.
Last but not least, SwiftUI fully supports the new Liquid Glass design language. Liquid Glass is a dynamic material combining the optical properties of glass with a sense of fluidity. It refracts content from below it, reflects light from around it, and has a lensing effect along its edges, giving interfaces a sense of depth and motion.
To take advantage of it, apps do not need to be redesigned, just rebuilt with Xcode 26 to take advantage of the new design. However, to fully embrace Liquid Glass, Apple recommends reviewing how foreground elements contrast with dynamic backgrounds, and optionally using new system materials to ensure accessibility and visual harmony.
On a related note, iOS 26 also includes an enhanced version of Swift Charts, now with support for 3D graphics. This update allows developers to plot data in three dimensions, visualize mathematical surfaces, and create more immersive and informative visualizations. Swift Charts now lets developers configure the camera, adjust lighting and materials, and fine-tune rendering properties.
SwiftUI 26 includes far more than we can cover here, so be sure to check out the official WWDC sessions for the full detail.