What's New in SwiftUI for iOS 27
iOS 27 lets you drag to reorder in any container, add swipe actions outside of List, and cache AsyncImage responses. A tour of the headline SwiftUI changes from WWDC 2026, with code.
// 85 articles available
iOS 27 lets you drag to reorder in any container, add swipe actions outside of List, and cache AsyncImage responses. A tour of the headline SwiftUI changes from WWDC 2026, with code.
Before WWDC 2026 I wrote down predictions and never hit publish. Four months later, with iOS 27 out and iPhone Duo days away, it's time to grade them against what Apple actually shipped.
When two windows share iPhone Duo's inner display, neither one is told which side it's on. I built a proof of concept in Xcode 27.1 and found the fold's ReservedRegion answers it, once you know its frame is clipped to your window.
iOS 27.2 changes App Tracking Transparency in the European Union: a full-page prompt with Markdown text, an optional Additional Information button, and a yearly re-prompt. Here's who sees what and how to adopt the new API.
Use CameraCaptureAccessory to show a scrolling teleprompter on iPhone Duo's outer display while the rear camera records, in SwiftUI and UIKit.
UIScreen.main assumes your app lives on one screen with one size. iPhone Duo, iPhone Mirroring, and iPad windowing all break that assumption. Here's what to use instead in UIKit and SwiftUI.
iOS 27.1 lets you read iPhone Duo's hinge angle and fold status with onHingeChange in SwiftUI and UIHingeInteraction in UIKit. Here's how the APIs work, why they're for interactive effects rather than layout, and a fold-to-scrub example.
iPhone Duo reserves parts of its displays for the fold and the front cameras. Learn which regions exist, when system views handle them for you, and how to query ReservedRegion in SwiftUI and UIKit to move custom content out of the way.
ArrangementView is a new iOS 27.1 container that lays out a primary and secondary view side by side or layered, and rearranges them around the iPhone Duo fold. Here's how the split and overlay styles work, how to size them, and when not to use one.
On iPhone Duo, toolbars and tab bars move to the side of the screen. Learn when that happens, how to make sure the right items survive, and how to use axisBehavior, visibility priority, and compression behavior in SwiftUI.
iPhone Duo ships on October 23 with a folding inner display, a compact outer display, and toolbars that move to the side. Here's what to check in your app first, and where the new iOS 27.1 APIs fit in.
How Form differs from List, how to structure it with Sections, what .grouped and .columns actually change, and a validation pattern that does not fight the framework.
Xcode 27 can export its seven agent skills (SwiftUI, testing, security). Here's how to export them and load them in Claude Code, Codex, or Cursor.
A practical guide to App Tracking Transparency in iOS, covering the Info.plist usage description, the ATTrackingManager API, authorization statuses, and when to actually prompt the user from SwiftUI.
How to set up custom URL schemes and Universal Links in iOS, handle incoming URLs in SwiftUI, and route users to the right screen.
A practical guide to scheduling and handling local notifications in iOS using UNUserNotificationCenter, from permission requests to actionable notification categories.
A practical guide to SwiftUI animations covering implicit and explicit animations, spring physics, PhaseAnimator for multi-step sequences, and KeyframeAnimator for timeline-based control.
ViewThatFits picks the first child view that fits the available space. See how to build adaptive SwiftUI layouts with it, with examples and gotchas.
iOS 18 introduced public APIs for building custom container views that can decompose content into individual subviews. Learn how to use ForEach(subviews:), Group(subviews:), and ContainerValues.
Create interactive buttons for the Control Center using ControlWidgetButton and App Intents in iOS 18.
Add haptic feedback to your SwiftUI views using the sensoryFeedback modifier, with built-in support for success, error, impact, and selection feedback.
Learn how to use Swift's @Observable macro introduced in iOS 17, understand its advantages over ObservableObject, and migrate your existing code to the modern observation system.
Use @AppStorage for small SwiftUI settings, UserDefaults outside views, and SwiftData for real models. Here is when each one fits, with code.
Learn how to create beautiful, interactive charts in SwiftUI using Apple's Swift Charts framework, from simple line charts to customized bar graphs.
The cornerRadius modifier is deprecated in iOS 17. Here's how to use clipShape, RoundedRectangle, and the new ConcentricRectangle to round corners the modern way.
If your Live Activity renders a grey box instead of your image, the problem is almost certainly the image size. Here's how to fix it.
Preview Live Activity views right in Xcode without launching the app. Use the #Preview macro with content states to iterate on your UI fast.
When SwiftUI previews break, the error messages aren't always helpful. Here's how to debug them, clear caches, and get back to a working state.
Learn different ways to set background colors on SwiftUI views, from simple color fills to gradients and materials.
NavigationStack replaced NavigationView in iOS 16 with a more powerful programmatic navigation model. Here's what changed and how to migrate.
Learn what the "some" keyword means in Swift, how opaque return types work, and why SwiftUI uses "some View" everywhere.
A practical guide to choosing between SwiftUI and UIKit in 2026, based on your project requirements, team experience, and the current state of both frameworks.
Learn how to show loading spinners in SwiftUI using ProgressView, including customization options and common loading patterns.
Learn how to use the allowsHitTesting modifier to make views ignore touches, letting taps pass through to elements behind them.
Learn how to use the contentShape modifier to expand or customize the tappable area of your SwiftUI views, making buttons and interactive elements more user-friendly.
Learn how to properly support dark mode in SwiftUI using semantic colors, adaptive color assets, and color scheme detection.
Learn how to detect when users shake their device in SwiftUI by bridging to UIKit's motion events and creating a reusable view modifier.
How glassEffect, GlassEffectContainer, glassEffectID and the glass button styles behave, with every example built on Xcode 27.1 and run on iOS 27.
Learn different approaches for handling optional ObservableObject instances in SwiftUI, from conditional rendering to wrapper patterns.
PermissionKit lets children request parental permission to communicate with new contacts directly through Messages. Here's how to integrate it into your social or messaging app to create safer communication experiences.
When building UIs that stream AI-generated content using Apple's Foundation Models framework, testing intermediate states in Xcode Previews requires some creative workarounds. Here's how to preview partially generated content without calling the actual model.
Resize images in SwiftUI using resizable(), frame(), scaledToFit, and scaledToFill. See clear examples and avoid the common aspect-ratio bugs.
Learn how to round only certain corners of a SwiftUI view using UnevenRoundedRectangle, custom shapes, and clipShape.
Understand the difference between @State and @Binding in SwiftUI, when to use each, and how they work together to manage data flow between views.
Learn how to use SF Symbols in your SwiftUI apps, including sizing, coloring, animations, and finding the right symbol for your needs.
Understanding the difference between frame alignment and stack alignment is the key to centering views exactly where you want them in SwiftUI.
How to add custom fonts to your SwiftUI app, use system font variants, and ensure your typography scales properly with Dynamic Type.
Failable initializers offer a cleaner alternative to if-let statements when your SwiftUI views depend on optional data.
How to detect when users scroll to the bottom of a list and automatically load more content.
Safe areas keep your content visible and interactive. Here's how they work in SwiftUI and when you should ignore them.
Learn how to display human-readable relative timestamps like "5 minutes ago" or "yesterday" using RelativeDateTimeFormatter in your SwiftUI apps.
When SwiftUI previews fail with cryptic errors or just spin forever, here's how to diagnose and fix the most common causes.
Learn how to access your app's App Delegate from anywhere in your Swift code, including from SwiftUI views.
Learn how to access photos from the camera roll in SwiftUI, including required permissions, Info.plist configuration, and using PhotosPicker for iOS 16+ or UIImagePickerController for earlier versions.
Learn how to add horizontal padding inside a TextEditor without affecting the scrollbar using the contentMargins modifier introduced in iOS 17.
Real presentationDetents heights measured on iOS 27, what the detent order does, and what happens when you present more than one SwiftUI sheet.
Learn how to use ToolbarSpacer to add fixed and flexible spacing between toolbar items in SwiftUI, new in iOS 26.
Learn how to detect app lifecycle changes in SwiftUI, save state when your app enters the background, and restore it when users return, using scenePhase and UIApplication notifications.
Learn how to detect when users enable Low Power Mode and automatically reduce animations, refresh rates, and visual effects to preserve battery life in your SwiftUI app.
Learn how to detect when a user successfully shares content using a share sheet in SwiftUI by wrapping UIActivityViewController.
Learn how to create a Material Design-style floating action button in SwiftUI that intelligently moves above the keyboard and avoids blocking text input fields.
Learn how to add custom toolbar buttons above the keyboard in SwiftUI using the .toolbar modifier with keyboard placement for Done buttons, formatting controls, and more.
Detect screenshots with a UIKit notification and keep sensitive SwiftUI content out of them. Tested on iOS 27, including the popular trick that doesn't work.
Learn how to add pull-to-refresh functionality to custom ScrollViews in SwiftUI without using List, perfect for custom layouts and complex scroll content.
Learn how to build skeleton loading screens with animated shimmer effects in SwiftUI using gradients, AnimatableModifier, and reusable view modifiers for a polished loading experience.
Learn how to implement undo/redo functionality in SwiftUI using UndoManager, including environment injection, registering actions, and creating undo buttons for professional editing experiences.
Learn how to prevent users from dismissing modal sheets by swiping down in SwiftUI using interactiveDismissDisabled.
Add an AppDelegate to a SwiftUI app with @UIApplicationDelegateAdaptor to handle push tokens, launch options, and lifecycle callbacks SwiftUI lacks.
Learn how to access SwiftUI environment values in View extensions using ViewModifiers for clean, reusable code.
Learn how to create and display QR codes in SwiftUI using Core Image filters.
Find any SF Symbol by name without leaving Xcode, using the Library panel search and a few shortcuts.
Learn how to dump all SwiftUI environment values for debugging purposes.
Learn how to create a custom input accessory view that stays above the keyboard, similar to iMessage's input bar.
Learn how to align single and multiline text in SwiftUI.
Learn how to use ScrollViewReader and ScrollViewProxy to scroll a SwiftUI list to a specific item automatically.
Learn how to detect when a context menu is open in SwiftUI.
Learn how to create a WebView/WKWebView with a transparent/clear background in SwiftUI.
Learn how to accept user input in an alert using TextField or SecureField.
Learn how to create a modifier that limits the characters that can be entered in a TextEditor or TextField view in SwiftUI.
Learn the ways to scale a text view's font size to fit its parent view in SwiftUI.
Learn how to use a WKWebView as a quick way to load a GIF from a URL and display it in a SwiftUI view.
Learn how to use DisclosureGroupStyle to create custom DisclosureGroup views in SwiftUI.
Learn how to force the navigation bar to show a background color in SwiftUI.
Learn how to detect if a SwiftUI app is running in a Xcode Preview.
How to use the SwiftUI DisclosureGroup view to create collapsable content.