Skip to content
All articles

iPhone Duo Size Classes: Folded, Half-Open and Open Explained

Which size classes iPhone Duo reports folded, half-open and open, why to adapt to size classes instead of orientation, and SwiftUI and UIKit code to do it.

By AppleDuo EditorialPublished 7 min read

Also available in:DeutschEspañolFrançais日本語Türkçe

On this page
  1. What size classes does iPhone Duo report in each pose?
  2. Why use size classes instead of orientation on iPhone Duo?
  3. How do I read size classes in SwiftUI?
  4. How do I read size classes in UIKit with traitCollection?
  5. How do size classes work inside ArrangementView panes?
  6. How do I test iPhone Duo poses in Xcode Device Hub?
  7. Key takeaways

If you only have time for one change before your app meets iPhone Duo, make it size classes. The device has two displays and several poses, and each pose hands your app a different amount of space. Getting iPhone Duo size classes right is what makes one layout work on all of them, without a single check for the device model.

The short version comes from iOS developer @sarunw: folded, iPhone Duo is an iPhone; unfolded, it's an iPad. This post explains what that means for each pose, why orientation is the wrong signal, and how to read size classes in SwiftUI and UIKit. Everything here is based on Apple's Tech Talks, Apple's developer forums and cited developer reports. The APIs ship with iOS 27.1 and Xcode 27.1, and details can change between releases.

What size classes does iPhone Duo report in each pose?

A size class is a coarse description of the space your app has: compact or regular, horizontally and vertically. On iPhone Duo, the combination depends on which display is active, which in turn depends on how far the device is open.

In Apple's Prepare your app for iPhone Duo Tech Talk, the outer display "behaves like other iPhone models," and the inner display reports regular in both directions, which leaves room for content like sidebars. @sarunw's breakdown adds the half-open pose and both orientations:

PoseDisplayHorizontalVerticalBehaves like
Closed, portraitOuterCompactRegulariPhone in portrait
Closed, landscapeOuterCompactCompactiPhone in landscape
Half-open, like a bookInnerRegularRegulariPad
Open, portraitInnerRegularRegulariPad
Open, landscapeInnerRegularRegulariPad

A note on words: @sarunw uses "folded" to mean closed. Apple's Tech Talks use "partially folded, like a book" for the half-open pose. In this post, "closed" means the outer display is in use and "half-open" means the inner display is bent at the hinge.

For a sense of scale, Pasquale Pillitteri reports the outer display at 466 × 678 points and the inner display at 626 × 890 points in portrait. You shouldn't code against those numbers, but they explain why the inner display gets regular width: it is wider than any iPhone in portrait.

Why use size classes instead of orientation on iPhone Duo?

Orientation used to be a decent shortcut for "is there room for a second column?" On iPhone Duo it isn't. Apple's guidance is direct: avoid checking orientation for layout and use size classes instead. Two facts make orientation unreliable here.

  • The inner display ignores your supported orientations. Apple says the inner display doesn't honor your app's supported interface orientations. If you locked the app to portrait and branch on orientation, you will get layouts you never planned for.
  • Both orientations are regular on the inner display. Portrait and landscape on the inner display report the same size classes, so an orientation check tells you nothing about how much width you have.

Apple's forum answers say the same thing about device checks. In one thread, a DTS engineer advised: "don't think in terms of the specific screen, just the available space you have to do your layout." In another, an Apple evangelist recommended avoiding device-specific logic, embracing size classes and supporting all orientations. That also covers iPhone apps that iOS 27 can now resize on iPad and in iPhone Mirroring on Mac.

There's also no special trait for posture. Asked whether UITraitCollection exposes the fold, an Apple engineer answered in thread 848007: "There are not UITraitCollection traits of the type you are mentioning." Size classes drive layout. Reserved regions and the hinge APIs handle the fold itself.

How do I read size classes in SwiftUI?

SwiftUI puts both size classes in the environment. Read them in the view that makes the layout decision, and SwiftUI re-renders that view when the device opens, closes or rotates. The environment keys are the ones Apple shows in the Tech Talk.

struct LibraryView: View {
    @Environment(\.horizontalSizeClass) private var horizontalSizeClass
    @Environment(\.verticalSizeClass) private var verticalSizeClass

    var body: some View {
        if horizontalSizeClass == .regular {
            // Inner display: room for a list and a detail side by side.
            HStack(spacing: 0) {
                AlbumList()
                AlbumDetail()
            }
        } else {
            // Outer display: one column, like any iPhone.
            AlbumList()
        }
    }
}

This sample swaps a one-column layout for a two-column one based only on width. Use the vertical size class for decisions about height, for example hiding a large header when the outer display is in landscape and both values are compact.

Before you write this by hand, check whether a system container already does it. Apple notes that NavigationSplitView collapses to a single stack when the device is closed and tiles or overlays its columns when it is open, and that TabView adapts to all poses. If your app uses those containers, much of the size class work is done for you.

How do I read size classes in UIKit with traitCollection?

In UIKit, size classes live on the trait collection of every view and view controller: traitCollection.horizontalSizeClass and traitCollection.verticalSizeClass. Since iOS 17, you can register for trait changes instead of overriding the deprecated traitCollectionDidChange(_:).

final class LibraryViewController: UIViewController {
    private let detailContainer = UIView()
    private var listWidthConstraint: NSLayoutConstraint!

    override func viewDidLoad() {
        super.viewDidLoad()
        registerForTraitChanges(
            [UITraitHorizontalSizeClass.self, UITraitVerticalSizeClass.self]
        ) { (self: Self, _: UITraitCollection) in
            self.updateLayout()
        }
        updateLayout()
    }

    private func updateLayout() {
        let isWide = traitCollection.horizontalSizeClass == .regular
        detailContainer.isHidden = !isWide
        listWidthConstraint.isActive = isWide
    }
}

Here the controller shows its detail container only when the width is regular, and updates whenever either size class changes, such as when the device opens. As with SwiftUI, prefer UISplitViewController and UITabBarController where they fit, since Apple says they adapt to the fold automatically.

Two related habits from the same Tech Talk help size-class layouts behave. Replace UIScreen.main.scale with traitCollection.displayScale, because "main screen" is ambiguous on a device with two displays. And treat safe area insets on each side independently, because on iPhone Duo they are often uneven.

How do size classes work inside ArrangementView panes?

ArrangementView, new in iOS 27.1, places a primary and a secondary view side by side, stacked, or overlaid, depending on space and pose. Apple's Strike a pose with adaptive layouts on iPhone Duo talk describes the inputs it weighs for a layout: "the horizontal and vertical size class of the view," the aspect ratio of the view, and whether any division region, such as the fold, is active.

The practical takeaway is to read size classes inside each pane rather than assuming a pane inherits the window's values. A pane that gets half of the inner display has far less width than the whole display. @sarunw published a chart of the size classes each view receives on iPhone Duo; it's an image, so check the original post for the per-pane values rather than relying on a summary here.

Collapse matters too. An Apple DTS engineer explained in thread 847800 that ArrangementView "collapses to displaying only one view" when its split can't be satisfied in the current aspect ratio, pose or compact size class. It keeps the view with the higher .layoutPriority, or the primary view by default. If your secondary pane holds essential controls, give users another way to reach them when the width is compact.

struct EditorView: View {
    var body: some View {
        ArrangementView {
            VideoPreview()
        } secondary: {
            EditingControls()
        }
        .arrangementViewStyle(.split)
    }
}

struct VideoPreview: View {
    @Environment(\.horizontalSizeClass) private var horizontalSizeClass

    var body: some View {
        PreviewCanvas()
            .toolbar {
                if horizontalSizeClass == .compact {
                    // The controls pane may be hidden; offer them from the toolbar.
                    ToolbarItem { EditingControlsButton() }
                }
            }
    }
}

The ArrangementView and .arrangementViewStyle(.split) calls are shown as Apple presents them in the Tech Talk. The compact-width fallback follows the approach suggested in the same forum thread.

How do I test iPhone Duo poses in Xcode Device Hub?

You don't need the hardware to check size classes. Apple's Tech Talk lists the steps: choose the iPhone Duo simulator in Xcode 27.1, run your app in Device Hub, and use the control buttons at the bottom to open, close, rotate or fold the device. Device Hub and the full-screen experience both require Xcode 27.1.

Work through every row of the table above. For each pose, confirm that:

  1. The layout matches the size classes, not the orientation.
  2. Text and controls stay inside the safe area on every side, not just the top and bottom.
  3. Nothing important sits across the fold when the device is half-open.
  4. State survives the transition: scroll position, text input and the current selection.

Then test narrower widths on the inner display. Apple suggests dragging the app by the home indicator to one side of the screen to enter Split View multitasking, then to the other side. The forum DTS engineer specifically called out two apps open on the inner display as a configuration to check, since your app then gets less than the full regular width. @sarunw also notes that Xcode 27.2's Device Hub can fake memory pressure, slow-motion animations, a shake and a fall, which helps when you're chasing bugs that appear mid-transition.

Half-open is worth extra attention in games. A pose that reports regular width can still be physically split in two, which is what games like Greens Mini Golf use, with the putting green on the lower half and a caddie camera on the upright half. Size classes won't tell you where the fold is; that is the job of reserved regions and the hinge APIs.

Key takeaways

  • Closed, iPhone Duo reports iPhone size classes: compact width with regular height in portrait, compact in both directions in landscape.
  • Half-open or open, the inner display reports regular width and regular height in both orientations, like an iPad.
  • Don't branch on orientation or device model. The inner display ignores supported orientations, and Apple recommends adapting to available space.
  • Read horizontalSizeClass and verticalSizeClass from the SwiftUI environment or traitCollection in UIKit, and prefer system containers that already adapt.
  • Inside ArrangementView, read size classes per pane and plan for the split collapsing to one view.
  • Test every pose and Split View in Device Hub with Xcode 27.1.

Size classes are the first step. Next, see how bars move to the side of the screen in our guide to the iPhone Duo vertical toolbar, work through the full iPhone Duo preparation checklist, or browse games that already put the hinge to work on Built for the fold.

Frequently asked questions

What size class does the iPhone Duo inner display use?

The inner display reports a regular horizontal and regular vertical size class, in portrait and in landscape, whether the device is half-open or fully open. That is the same combination a full-screen iPad app sees.

What size class does the iPhone Duo outer display use?

The outer display behaves like other iPhone models. In portrait it reports compact width and regular height; in landscape it reports compact width and compact height.

Should I check orientation or the device model to adapt my app for iPhone Duo?

No. Apple recommends avoiding device-specific logic and orientation checks and adapting to size classes and available space instead. The inner display does not honor your app's supported interface orientations, so orientation is not a reliable layout signal there.

Is there a UITraitCollection trait for the iPhone Duo fold or posture?

An Apple engineer said on the developer forums that there are no trait collection traits for posture. Use size classes for layout, reserved regions for the fold, and the hinge APIs if you need the fold state itself.

How do I test iPhone Duo size classes without the device?

Run your app on the iPhone Duo simulator in Device Hub, which requires Xcode 27.1. Its controls open, close, rotate and fold the device, and you can drag the app into Split View on the inner display to test narrower widths.

Sources

  1. Size classes on iPhone Duo: folded portrait, folded landscape, half-open and open · @sarunw on X
  2. Folded, iPhone Duo is an iPhone. Unfolded, it's an iPad. · @sarunw on X
  3. Start with size classes, layout margins and safe area insets · @sarunw on X
  4. Size classes of each view in ArrangementView on iPhone Duo · @sarunw on X
  5. Prepare your app for iPhone Duo · Apple Developer
  6. Strike a pose with adaptive layouts on iPhone Duo · Apple Developer
  7. Does the iPhone Duo inner display use a regular horizontal size class? · Apple Developer Forums
  8. Adapting an existing UIKit app for iPhone Duo at runtime · Apple Developer Forums
  9. Hinge articulation and UITraitCollection in custom view controllers · Apple Developer Forums
  10. How should ArrangementView behave across iPhone Duo display modes? · Apple Developer Forums
  11. iPhone Duo Apps, What Changes in Your Code and What to Do With Old Ones · Pasquale Pillitteri

Make the fold part of your app.

We showcase apps and games that do something real with iPhone Duo. Send us yours with a link to it on the App Store, or see what other developers have built.

[email protected]