SwiftUI Size Classes for iPhone Duo: Build for Space, Not Device Names
A practical SwiftUI strategy using adaptive containers, size classes, ViewThatFits, AnyLayout, and stable state across display changes.

Start with system containers
Use NavigationStack and NavigationSplitView before building a custom two-pane shell. They understand compact and regular presentations and preserve expected platform behavior.
For smaller decisions, ViewThatFits can select a layout that fits. AnyLayout helps switch arrangements while preserving view identity. Keep model state above the adaptive branch so a layout change does not reset work.
Our ArrangementView guide covers reserved regions and our migration guide identifies legacy assumptions.
Test transitions, not screenshots
A layout can look correct in static previews and still lose focus, scroll position or typed text during transition. Test while editing, presenting a sheet, using large Dynamic Type and running Split View.
Avoid pose-driven structure
Hinge information can support an effect, but should not decide whether core navigation exists. Read why Apple discourages pose-driven design and our hinge API guide.
The target is not a special Duo layout. It is an app that remains coherent whenever its usable region changes. That improves iPad and future hardware too.
From the maker
Get PromptSlate Studio on the App Store
Write, prompt and record in one focused workspace. Out now — $9.99 one-time, no subscription. Every download supports independent development of new apps.
See PromptSlate Studio details · Also in the works: DuoSketch
Spotted something to fix, or an app we should cover?
This article is independent research, cross-checked against Apple's developer documentation. If something's out of date, or you know an app that deserves a look, let us know — and if you're building for iPhone Duo yourself, we're happy to talk.
hola@ayudantedigital.es