JUST ENDED
|

iPhone Duo UIKit Q&A

Visit the Apple Developer Forums to discuss adapting your UIKit app to iPhone Duo. Learn about size classes and trait collections, asymmetric safe area insets and layout margins, reserved regions and arrangements, Split View and tab bar behavior, and responding to the hinge angle.

Post

Replies

Boosts

Views

Activity

Keyboard avoidance for an inset sheet on the inner display
On the folded phone the keyboard resizes our edge-to-edge sheet. On the inner display the sheet is inset, and keyboardFrameEnd in screen coordinates no longer lines up with the sheet’s container, so input fields stay covered. Should we convert the keyboard frame into the sheet’s coordinate space, and does keyboardLayoutGuide follow the sheet or the screen on iPhone Duo?
Topic: UI Frameworks SubTopic: UIKit
0
0
21
10h
Where can we find the official WWDC session / sample code for adopting the foldable iPhone (this generation's Duo hardware)?
We've been reverse-engineering behavior from the Simulator device profile alone. Is there a WWDC session, updated UIKit/SwiftUI documentation, or sample project specifically covering foldable iPhone adoption (window/scene handling, size-class behavior, collection/table view sizing, and the fold-posture API surface) that we should be building against instead of inferring behavior empirically?
Topic: UI Frameworks SubTopic: UIKit
0
0
22
10h
Confirming iPhone Duo is modeled as two separate UIScreens, not one resizable screen
on the iPhone Duo simulator reports two distinct "Integrated" screens ("LCD" at 1398×2034 and "LCD-1" at 2007×2853), both simultaneously powered on. Is this the correct mental model for the real hardware — a genuine cover display and inner display as separate UIScreen objects — as opposed to one continuously flexible panel whose bounds just change? This significantly affects whether we handle the transition via trait/size-class changes or via UIScreen.didConnectNotification-style multi-screen handling.
Topic: UI Frameworks SubTopic: UIKit
0
1
24
10h
Widgets on each screen
my app widget supports iPhone and iPad. Which widget sizes are available on the outer and inner home screens (including systemExtraLarge)? Does a fold or unfold trigger a new timeline or a re-render?
Topic: UI Frameworks SubTopic: UIKit
0
0
20
10h
Is the fold/unfold transition a window resize, a scene relocation, or a completely new scene?
When toggling between cover and unfolded posture in the iPhone Duo simulator, we observe several seconds of black screen during the transition — much longer than a typical 0.3s rotation animation. Does viewWillTransition(to:with:) fire at all during this transition, or does the OS tear down and recreate the UIWindowScene/UIWindow on the other screen? We need to know which lifecycle hooks are guaranteed to fire so we can update UI state (search width, gradients, cached layout sizes) at the right time.
Topic: UI Frameworks SubTopic: UIKit
0
1
22
10h
What an unadopted app actually does on Duo, and what is required before launch
Our app is a standard iPhone app (iOS 15 and later). Guidance so far is that an app that ignores ArrangementView, reserved regions, and the hinge keeps its existing iPhone size. On a folded Duo, does that mean letterboxed on one half, scaled on the outer display, or a normal compact layout on the cover screen? Is any of the six new APIs required for App Store review, or can we ship with size-class adaptation only and adopt arrangements after the October 23 launch?
Topic: UI Frameworks SubTopic: UIKit
1
0
50
10h
Safe area and status-bar height during the fold animation
We read windowScene.statusBarManager?.statusBarFrame and pin views to the safe area. Mid-fold, the status bar and home-indicator insets change, but several child view controllers do not get viewSafeAreaInsetsDidChange until the animation finishes. Which callbacks are apps expected to use to track safe area continuously through a fold?
Topic: UI Frameworks SubTopic: UIKit
0
0
17
10h
Are custom detents resolved against the window or against UIScreen?
Our detents use fractions and absolute heights derived from the screen’s long side. After a fold, a detent that was “medium” on the outer display is far too short or too tall on the inner display until we rebuild the sheet. Do custom and system detents automatically track windowScene.screen.bounds, or must the app reassign sheet.detents when the scene geometry changes?
Topic: UI Frameworks SubTopic: UIKit
0
0
19
10h
Changing size class while a UISheetPresentationController is already presented
If the user folds or unfolds while our sheet is up, the detent heights and whether the sheet is inset are stale. We dismiss with animated: false and present again inside traitCollectionDidChange. Is the supported approach to update detents in place during the transition coordinator, and which callback is guaranteed to run after the sheet’s container has its final bounds?
Topic: UI Frameworks SubTopic: UIKit
0
0
20
10h
pageSheet width on the Duo inner display
The same .pageSheet is edge-to-edge on the folded phone and an inset sheet on the unfolded display, because the size class is regular. Our home sheet used to include its own tab bar so it could cover the real one. On the inner display that produces two tab bars. Should a phone-style edge-to-edge sheet on the inner display be requested with a specific modalPresentationStyle or UISheetPresentationController flag, rather than inferring it from “sheet width ≈ window width”?
Topic: UI Frameworks SubTopic: UIKit
0
0
16
10h
Tab item titles stay truncated after the bar width changes
UITabBar measures titles on the first layout pass. After unfolding, the bar is much wider but labels stay truncated with an ellipsis until the user switches tabs. Reapplying standardAppearance does not rebuild the buttons. Is there a public API to invalidate tab-item title measurement when the bar’s width changes?
Topic: UI Frameworks SubTopic: UIKit
0
0
18
10h
iOS 27 sidebar preferredPlacement = .tabBar
On iOS 27 we set sidebar.preferredPlacement = .tabBar and sidebar.preferredLayout = .tile, and we also set mode = .tabBar. After unfolding, a sidebar can still appear and dim the content underneath. What is the correct combination so a five-item tab bar stays a tab bar on both Duo displays?
Topic: UI Frameworks SubTopic: UIKit
0
1
22
10h
UITabBarController becomes a sidebar on the inner display
With the default mode of .automatic, the inner display shows a sidebar instead of a bottom tab bar. The sidebar draws UIKit’s dimming view over the selected view controller, which hides our map. We force mode = .tabBar on iOS 18. Is a bottom tab bar on the Duo inner display supported, or is the sidebar the intended phone-unfolded layout?
Topic: UI Frameworks SubTopic: UIKit
0
0
21
10h
Checking safeAreaInsets in viewWillTransition
Hi. We use the viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) function to update frames when user rotates / opens / folds an iPhone Duo. However we found that the safeAreaInsets are not always correct in the alongsideTransition block of the animate(alongsideTransition:completion:) funciton. Here's the test code I wrote in a UIViewController: override func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) { super.viewWillTransition(to: size, with: coordinator) print(">>> before animate, view.frame: \(view.frame)") print(">>> before animate, view.safeAreaInsets: \(view.safeAreaInsets)") coordinator.animate { [weak self] _ in print(">>> in animate, view.frame: \(self?.view.frame)") print(">>> in animate, view.safeAreaInsets: \(self?.view.safeAreaInsets)") DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { print(">>> after 0.1, view.frame: \(self?.view.frame)") print(">>> after 0.1, view.safeAreaInsets: \(self?.view.safeAreaInsets)") print(">>> -------------") } } } And here's the logs when I rotate an opened iPhone Duo from "portrait" to "landscape" (where the tab bar is placed on the trailing / right side of screen): >>> before animate, view.frame: (0.0, 0.0, 669.0, 951.0) >>> before animate, view.safeAreaInsets: UIEdgeInsets(top: 82.0, left: 0.0, bottom: 83.0, right: 0.0) >>> in animate, view.frame: Optional((0.0, 0.0, 951.0, 669.0)) >>> in animate, view.safeAreaInsets: Optional(__C.UIEdgeInsets(top: 82.0, left: 0.0, bottom: 83.0, right: 0.0)) >>> after 0.1, view.frame: Optional((0.0, 0.0, 951.0, 669.0)) >>> after 0.1, view.safeAreaInsets: Optional(__C.UIEdgeInsets(top: 24.0, left: 0.0, bottom: 34.0, right: 84.0)) >>> ------------- In the alongsideTransition block I can get the correct view's frame, but the safeAreaInsets value is not correct. After a short delay of 0.1 seconds the safeAreaInsets becomes correct. Is getting the wrong safeAreaInsets in the alongsideTransition block a normal behavior? When is the correct timing to detect view's frame and safeAreaInsets when rotation (or view size change) happens?
Topic: UI Frameworks SubTopic: UIKit
0
0
23
10h
Keyboard avoidance for an inset sheet on the inner display
On the folded phone the keyboard resizes our edge-to-edge sheet. On the inner display the sheet is inset, and keyboardFrameEnd in screen coordinates no longer lines up with the sheet’s container, so input fields stay covered. Should we convert the keyboard frame into the sheet’s coordinate space, and does keyboardLayoutGuide follow the sheet or the screen on iPhone Duo?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
21
Activity
10h
Does content state (scroll position, selected tab, in-progress form input) persist automatically across the fold transition, or must apps restore it manually?
Does content state (scroll position, selected tab, in-progress form input) persist automatically across the fold transition, or must apps restore it manually?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
19
Activity
10h
Where can we find the official WWDC session / sample code for adopting the foldable iPhone (this generation's Duo hardware)?
We've been reverse-engineering behavior from the Simulator device profile alone. Is there a WWDC session, updated UIKit/SwiftUI documentation, or sample project specifically covering foldable iPhone adoption (window/scene handling, size-class behavior, collection/table view sizing, and the fold-posture API surface) that we should be building against instead of inferring behavior empirically?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
22
Activity
10h
Confirming iPhone Duo is modeled as two separate UIScreens, not one resizable screen
on the iPhone Duo simulator reports two distinct "Integrated" screens ("LCD" at 1398×2034 and "LCD-1" at 2007×2853), both simultaneously powered on. Is this the correct mental model for the real hardware — a genuine cover display and inner display as separate UIScreen objects — as opposed to one continuously flexible panel whose bounds just change? This significantly affects whether we handle the transition via trait/size-class changes or via UIScreen.didConnectNotification-style multi-screen handling.
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
1
Views
24
Activity
10h
Widgets on each screen
my app widget supports iPhone and iPad. Which widget sizes are available on the outer and inner home screens (including systemExtraLarge)? Does a fold or unfold trigger a new timeline or a re-render?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
20
Activity
10h
Order of viewWillTransition and traitCollectionDidChange when folding
On fold we see both a size transition and a horizontal size-class change, but not always in the same order, and sometimes only one of them. We update tab-bar visibility in both. Which one is guaranteed for a fold, and should geometry updates happen only inside the transition coordinator’s alongsideTransition block?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
25
Activity
10h
Is the fold/unfold transition a window resize, a scene relocation, or a completely new scene?
When toggling between cover and unfolded posture in the iPhone Duo simulator, we observe several seconds of black screen during the transition — much longer than a typical 0.3s rotation animation. Does viewWillTransition(to:with:) fire at all during this transition, or does the OS tear down and recreate the UIWindowScene/UIWindow on the other screen? We need to know which lifecycle hooks are guaranteed to fire so we can update UI state (search width, gradients, cached layout sizes) at the right time.
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
1
Views
22
Activity
10h
What an unadopted app actually does on Duo, and what is required before launch
Our app is a standard iPhone app (iOS 15 and later). Guidance so far is that an app that ignores ArrangementView, reserved regions, and the hinge keeps its existing iPhone size. On a folded Duo, does that mean letterboxed on one half, scaled on the outer display, or a normal compact layout on the cover screen? Is any of the six new APIs required for App Store review, or can we ship with size-class adaptation only and adopt arrangements after the October 23 launch?
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
0
Views
50
Activity
10h
Child views with a flexible autoresizing mask stretch across the fold
A map callout loaded from a xib has autoresizingMask including flexible width and height. Unfolding resizes it to the new parent bounds, so a fixed-size pin stretches. Rotation does the same. Is the fold delivered as a normal bounds change to the existing view hierarchy, and should fixed-size subviews avoid width/height-sizable masks?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
18
Activity
10h
Safe area and status-bar height during the fold animation
We read windowScene.statusBarManager?.statusBarFrame and pin views to the safe area. Mid-fold, the status bar and home-indicator insets change, but several child view controllers do not get viewSafeAreaInsetsDidChange until the animation finishes. Which callbacks are apps expected to use to track safe area continuously through a fold?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
17
Activity
10h
Are custom detents resolved against the window or against UIScreen?
Our detents use fractions and absolute heights derived from the screen’s long side. After a fold, a detent that was “medium” on the outer display is far too short or too tall on the inner display until we rebuild the sheet. Do custom and system detents automatically track windowScene.screen.bounds, or must the app reassign sheet.detents when the scene geometry changes?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
19
Activity
10h
Changing size class while a UISheetPresentationController is already presented
If the user folds or unfolds while our sheet is up, the detent heights and whether the sheet is inset are stale. We dismiss with animated: false and present again inside traitCollectionDidChange. Is the supported approach to update detents in place during the transition coordinator, and which callback is guaranteed to run after the sheet’s container has its final bounds?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
20
Activity
10h
Compatibility with existing AppDelegate based app.
I have an app mixing UIKit and SwiftUI. Right now it’s not yet migrated to SceneDelegate. What will happen when the iPhone Duo is available ? Will the app run, or crash ?
Topic: UI Frameworks SubTopic: UIKit
Replies
2
Boosts
0
Views
67
Activity
10h
pageSheet width on the Duo inner display
The same .pageSheet is edge-to-edge on the folded phone and an inset sheet on the unfolded display, because the size class is regular. Our home sheet used to include its own tab bar so it could cover the real one. On the inner display that produces two tab bars. Should a phone-style edge-to-edge sheet on the inner display be requested with a specific modalPresentationStyle or UISheetPresentationController flag, rather than inferring it from “sheet width ≈ window width”?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
16
Activity
10h
How to know when active regions are changing?
Hinge interaction, layoutSubviews, etc – when we're supposed to get notified, and react to the change of pose/layout?
Topic: UI Frameworks SubTopic: UIKit
Replies
2
Boosts
0
Views
102
Activity
10h
Tab item titles stay truncated after the bar width changes
UITabBar measures titles on the first layout pass. After unfolding, the bar is much wider but labels stay truncated with an ellipsis until the user switches tabs. Reapplying standardAppearance does not rebuild the buttons. Is there a public API to invalidate tab-item title measurement when the bar’s width changes?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
18
Activity
10h
What is the dimming view when a tab-bar sidebar overlaps the selected controller?
When the automatic sidebar is active, a dimming layer covers the selected child. We cannot find a public property to disable it. Is that dimming UITabBarController’s own overlay, and is there a supported way to keep the selected controller fully interactive while the sidebar is visible?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
20
Activity
10h
iOS 27 sidebar preferredPlacement = .tabBar
On iOS 27 we set sidebar.preferredPlacement = .tabBar and sidebar.preferredLayout = .tile, and we also set mode = .tabBar. After unfolding, a sidebar can still appear and dim the content underneath. What is the correct combination so a five-item tab bar stays a tab bar on both Duo displays?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
1
Views
22
Activity
10h
UITabBarController becomes a sidebar on the inner display
With the default mode of .automatic, the inner display shows a sidebar instead of a bottom tab bar. The sidebar draws UIKit’s dimming view over the selected view controller, which hides our map. We force mode = .tabBar on iOS 18. Is a bottom tab bar on the Duo inner display supported, or is the sidebar the intended phone-unfolded layout?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
21
Activity
10h
Checking safeAreaInsets in viewWillTransition
Hi. We use the viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) function to update frames when user rotates / opens / folds an iPhone Duo. However we found that the safeAreaInsets are not always correct in the alongsideTransition block of the animate(alongsideTransition:completion:) funciton. Here's the test code I wrote in a UIViewController: override func viewWillTransition(to size: CGSize, with coordinator: any UIViewControllerTransitionCoordinator) { super.viewWillTransition(to: size, with: coordinator) print(">>> before animate, view.frame: \(view.frame)") print(">>> before animate, view.safeAreaInsets: \(view.safeAreaInsets)") coordinator.animate { [weak self] _ in print(">>> in animate, view.frame: \(self?.view.frame)") print(">>> in animate, view.safeAreaInsets: \(self?.view.safeAreaInsets)") DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { print(">>> after 0.1, view.frame: \(self?.view.frame)") print(">>> after 0.1, view.safeAreaInsets: \(self?.view.safeAreaInsets)") print(">>> -------------") } } } And here's the logs when I rotate an opened iPhone Duo from "portrait" to "landscape" (where the tab bar is placed on the trailing / right side of screen): >>> before animate, view.frame: (0.0, 0.0, 669.0, 951.0) >>> before animate, view.safeAreaInsets: UIEdgeInsets(top: 82.0, left: 0.0, bottom: 83.0, right: 0.0) >>> in animate, view.frame: Optional((0.0, 0.0, 951.0, 669.0)) >>> in animate, view.safeAreaInsets: Optional(__C.UIEdgeInsets(top: 82.0, left: 0.0, bottom: 83.0, right: 0.0)) >>> after 0.1, view.frame: Optional((0.0, 0.0, 951.0, 669.0)) >>> after 0.1, view.safeAreaInsets: Optional(__C.UIEdgeInsets(top: 24.0, left: 0.0, bottom: 34.0, right: 84.0)) >>> ------------- In the alongsideTransition block I can get the correct view's frame, but the safeAreaInsets value is not correct. After a short delay of 0.1 seconds the safeAreaInsets becomes correct. Is getting the wrong safeAreaInsets in the alongsideTransition block a normal behavior? When is the correct timing to detect view's frame and safeAreaInsets when rotation (or view size change) happens?
Topic: UI Frameworks SubTopic: UIKit
Replies
0
Boosts
0
Views
23
Activity
10h