What's New in SwiftUI

  • Refreshed look and feel
  • Document based apps
  • Presentation and interactions
  • Data flow and Performance

Refreshed Look and Feel

New appearsActive environment property to observe whether the window is active, letting you adapt UI when a window loses focus.

Active appearance

iPad and Mac menu bar's default behavior — showing icon with title — has changed to text-only. The existing modifier can override this.

CommandMenu text-only default

Xcode SwiftUI previews now have resizability handles.

Xcode preview resizability handles

These handles hint at foldable iPhone support and surface best practices around adaptive layouts.

Resizability guidance

New tab role to make a trailing tab bar item stand out — similar to how the search tab already behaves in iOS 26.

New tab role

When resizing an app, the OS now auto-hides tab bar items into an Overflow Menu. To control which items get hidden last, use the new .visibilityPriority() modifier on ToolbarItemGroup.

visibilityPriority modifier

A new ToolbarOverflowMenu container lets you opt specific items into the overflow menu explicitly.

ToolbarOverflowMenu

For items that should never be hidden regardless of window size, there is a new placement option in the ToolbarItem API: topBarPinnedTrailing.

topBarPinnedTrailing placement

New toolbarMinimizeBehavior modifier to hide the toolbar on scroll.

toolbarMinimizeBehavior

Document Based Apps

Multiple new APIs for document-based apps.

Document app new features overview

New creation context API to start a document from different starting points.

Creation context API

WritableDocument with DocumentWriter and ReadableDocument with DocumentReader protocols provide sensible callbacks to optimize reading and writing based on snapshots — a type you control that represents the document state at a given point in time.

WritableDocument and ReadableDocument protocols

Presentation and Interactions

New .reorderable modifier and .reorderContainer modifier make it easy to support drag and drop in views beyond just lists.

reorderable and reorderContainer modifiers

More on these in the dedicated session: Code-along: Build powerful drag and drop in SwiftUI

Swipe actions now work on any view container — not just List — by combining .swipeActions with a .swipeActionContainer modifier on the ForEach container.

Swipe actions on any container

New item-binding based API for confirmation dialogs and alerts: the dialog or alert is shown when the bound item is non-nil.

Item-binding confirmation dialog APIItem-binding alert API

Data Flow and Performance

AsyncImage now supports HTTP caching via URLCache by default, respecting the caching policy set by your server. Pass a custom URLRequest to override the cache policy.

AsyncImage with URLCache

You can also swap the underlying URLSession to control cache size.

AsyncImage custom URLSession

@State has been refactored from a dynamic property into a macro. Previously, @State-stored @Observable objects were initialized multiple times when a parent view updated, even though the stored object stayed the same and the extra instances were immediately discarded. This is now fixed — and the fix is back-ported to iOS 17.

Storing Observable in @State — beforeStoring Observable in @State — after

This change can be a breaking change when building with Xcode 27: if you have a @State property with a default value that you then override in init, the compiler will surface an error. The fix is to remove the default value.

Breaking change example

Unified resultBuilder for SwiftUI: instead of per-type @ViewBuilder, you can now mark vars and functions with @ContentBuilder. This lets the compiler eliminate unnecessary code paths, reducing type-checking timeout errors.

Unified @ContentBuilder

New agent skills for agentic coding workflows are also available via xcrun.

Agentic coding supportxcrun agent skills export