# Drive layout from size classes, not device idiom > Apple's guidance is to avoid making display assumptions from the user interface idiom and to design across a continuum of sizes instead. Source: https://iphoneduosupport.com/checklist/size-classes-not-orientation/ Severity: blocker Category: layout Applies to: swiftui, uikit Symptom: The app shows its cramped iPhone layout on a 7.6-inch display with room for a sidebar, wasting most of the screen. Sources: https://developer.apple.com/videos/play/tech-talks/111461/ https://developer.apple.com/videos/play/tech-talks/111466/ Last verified: 2026-09-09 --- `UIUserInterfaceIdiom.phone` used to be a reliable shorthand for "small screen, one column, no sidebar". iPhone Duo makes that shorthand false: it reports the phone idiom while offering a regular-width display with room for a sidebar. ## Why it happens Idiom answers *what kind of device is this*. Layout needs to know *how much space do I have*. Those were correlated for a decade, so the first became a proxy for the second. iPhone Duo decouples them, and every layout decision built on the proxy now produces an iPhone-shaped UI on a display large enough for an iPad-shaped one. ## The fix Read size classes, which describe available space directly: ```swift // SwiftUI @Environment(\.horizontalSizeClass) private var horizontalSizeClass @Environment(\.verticalSizeClass) private var verticalSizeClass ``` ```swift // UIKit traitCollection.horizontalSizeClass traitCollection.verticalSizeClass ``` What to expect on this device: - **Inner display** — regular in *both* dimensions, and Apple explicitly notes it leaves room for sidebars - **Outer display** — compact width, regular height Because the inner display is regular-width, the same branch that already produces your iPad layout is usually the right one to reuse. Apps with an existing iPad target often have most of this work done. Avoid the temptation to write `if idiom == .pad || isDuo`. Detecting a specific device reintroduces exactly the assumption that broke here, and it will break again on the next form factor. Branch on space, not on hardware. ## How to verify Log both size classes as you fold, unfold, rotate, and enter Split View. Confirm your layout branches on those values and that no branch is reachable only by an idiom check. --- Published by iPhone Duo Support (https://iphoneduosupport.com). Not affiliated with Apple Inc.