// Shorts
One SwiftUI concept at a time
Modern SwiftUI APIs explained in about two minutes each — what problem it solves, working code, and the trap you'll hit the first time you use it.
20 shorts
iOS 16+
1iOS 17+
12@Observable: State Without the Boilerplate
The @Observable macro replaces @Published and ObservableObject with less code and smarter view invalidation.
@Bindable: Two-Way Bindings Into @Observable
@Bindable unlocks two-way SwiftUI bindings into an @Observable class without giving up single ownership.
ContentUnavailableView: The Empty State You Don't Have to Build
ContentUnavailableView gives every app the same polished empty state and no-search-results screen for free.
.inspector: One Modifier, Every Platform's Detail Pane
The .inspector modifier adds a trailing detail pane that adapts automatically across iPhone, iPad, and Mac.
scrollTargetBehavior: Snapping Carousels, No UIKit
Build a paging, view-aligned carousel with plain SwiftUI — no UICollectionView, no compositional layout.
scrollPosition(id:): Reading and Driving Scroll Position
A two-way binding to the currently scrolled item — jump to content and observe scroll position with one API.
containerRelativeFrame: Sizing Children as a Fraction of Their Container
Size a view as a percentage of its scroll view or container without a GeometryReader in sight.
scrollTransition: Per-Item Effects Driven by Scroll Phase
Scale and fade carousel items as they enter and leave the viewport, without measuring frames yourself.
phaseAnimator: Multi-Step Animation in One Modifier
Sequence a bump, settle, and rest animation without chaining withAnimation calls or DispatchQueue delays.
KeyframeAnimator: Independent Timelines Per Property
Animate scale, offset, and rotation on their own timelines with keyframeAnimator, instead of one shared curve.
symbolEffect: Native Animation for SF Symbols
Bounce, pulse, and morph SF Symbols with built-in effects instead of hand-rolled scale and crossfade tricks.
visualEffect: Geometry-Driven Effects, No GeometryReader
Scale scroll-carousel cards by their position using visualEffect, without wrapping each card in a GeometryReader.
iOS 18+
5@Entry: Custom Environment Values in One Line
The @Entry macro turns a multi-step EnvironmentKey into one line for custom environment and focus values.
onScrollGeometryChange: Scroll Offset Without GeometryReader Hacks
Observe raw scroll offset directly on the ScrollView, no PreferenceKey plumbing required.
MeshGradient: Real Gradient Meshes in SwiftUI
SwiftUI's MeshGradient renders true multi-point gradient meshes natively, replacing hacky stacks of blurred RadialGradients.
Tab and .sidebarAdaptable: One Tab Bar for iPhone and iPad
The new Tab builder plus .tabViewStyle(.sidebarAdaptable) turns one TabView into an iPad sidebar and an iPhone tab bar automatically.
Hero Zoom Push Transitions with navigationTransition(.zoom)
.navigationTransition(.zoom) turns a NavigationStack push into a hero zoom transition with no custom animation code.
iOS 26+
2glassEffect(): Liquid Glass on Custom Views
.glassEffect() applies Apple's iOS 26 Liquid Glass material to any custom view with a single modifier.
GlassEffectContainer: Morphing Glass Elements
GlassEffectContainer groups glass views so they sample light together, and glassEffectID morphs one glass shape into another.