Explore the various UI frameworks available for building app interfaces. Discuss the use cases for different frameworks, share best practices, and get help with specific framework-related questions.

All subtopics
Posts under UI Frameworks topic

Post

Replies

Boosts

Views

Activity

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
39
1w
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
45
1w
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
38
1w
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
44
1w
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
87
1w
Custom controls on the side
I would love to utilize the whole screen area of the iPhone Duo. To do that, my app needs to show the controls on the side under the status indicators. It works nice if you use system NavigationStacks and TabBars. But what if you don’t? I work on a browser app, and we don’t use system toolbars and tab bars, because they don’t provide enough flexibility for our tasks. For example, playing an icon animation in a tab bar is a bit challenging with the stock TabBar. As far as I know, only system toolbars and tab bars move to the side, and there’s no API to know where this region exactly is. So if you use some custom views you want to present on the side under the status indicators, you may need to guess its location depending on safe area margins, orientation and hinge state. I don’t want to do that, it doesn’t seem reliable. It differs from the previous times screen shape changed. On an iPhone X, you just continued to put interactive content inside safe area, and in many cases you don’t need to go outside it. But in the case of iPhone Duo, you get a blank, unused space on the side, so it feels like we should do something about it. So is there any way for the apps that do not use system tab bars and navigation system to put custom views in that blank area on the side?
Topic: UI Frameworks SubTopic: SwiftUI
0
2
86
1w
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
35
1w
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
44
1w
How to use ArrangementView for Closed and Open iPhone Duo Layouts
On iPhone Duo, is this the recommended pattern for displaying two views, A and B in a splitted way? I would use an ArrangementView configured as follows: When the hinge is closed, display A and B using a regular adaptive HStack/VStack. When the hinge is open, let ArrangementView split A and B across the two displays. Is this the intended way to structure this kind of layout?
Topic: UI Frameworks SubTopic: SwiftUI
0
0
18
1w
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
39
1w
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
35
1w
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
2
68
1w
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
43
1w
Best way to position game touch controls around the iPhone Duo hinge
For a full-screen game with a Metal/Unreal rendering view and a SwiftUI overlay for touch controls, what is the recommended way to keep interactive controls away from the hinge while still allowing the rendered game world to use the full display? Would you recommend querying ReservedRegion in the SwiftUI overlay while allowing the underlying render view to remain edge-to-edge? Also, should control placement respond continuously while the device is being folded, or primarily respond to layout/reserved-region changes once the pose changes?
Topic: UI Frameworks SubTopic: SwiftUI
0
0
20
1w
Can a non-camera game present supplementary content on iPhone Duo’s outer display?
I’m building a real-time game where the primary gameplay runs on the inner display. I’d like to use the outer display for optional supplementary content such as a scanner, companion view, enemy sensor, or other game information. The current Scene Accessories examples appear centered around CameraCaptureAccessory. Is there a supported API for a non-camera app or game to present arbitrary supplementary content on the outer display while the main game remains active on the inner display? If not currently supported, should developers design the outer-display feature as optional and wait for additional accessory types?
Topic: UI Frameworks SubTopic: SwiftUI
0
0
19
1w
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
39
Activity
1w
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
45
Activity
1w
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
38
Activity
1w
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
44
Activity
1w
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
44
Activity
1w
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
87
Activity
1w
Custom controls on the side
I would love to utilize the whole screen area of the iPhone Duo. To do that, my app needs to show the controls on the side under the status indicators. It works nice if you use system NavigationStacks and TabBars. But what if you don’t? I work on a browser app, and we don’t use system toolbars and tab bars, because they don’t provide enough flexibility for our tasks. For example, playing an icon animation in a tab bar is a bit challenging with the stock TabBar. As far as I know, only system toolbars and tab bars move to the side, and there’s no API to know where this region exactly is. So if you use some custom views you want to present on the side under the status indicators, you may need to guess its location depending on safe area margins, orientation and hinge state. I don’t want to do that, it doesn’t seem reliable. It differs from the previous times screen shape changed. On an iPhone X, you just continued to put interactive content inside safe area, and in many cases you don’t need to go outside it. But in the case of iPhone Duo, you get a blank, unused space on the side, so it feels like we should do something about it. So is there any way for the apps that do not use system tab bars and navigation system to put custom views in that blank area on the side?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
2
Views
86
Activity
1w
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
38
Activity
1w
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
35
Activity
1w
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
44
Activity
1w
How to use ArrangementView for Closed and Open iPhone Duo Layouts
On iPhone Duo, is this the recommended pattern for displaying two views, A and B in a splitted way? I would use an ArrangementView configured as follows: When the hinge is closed, display A and B using a regular adaptive HStack/VStack. When the hinge is open, let ArrangementView split A and B across the two displays. Is this the intended way to structure this kind of layout?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
0
Views
18
Activity
1w
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
39
Activity
1w
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
100
Activity
1w
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
35
Activity
1w
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
184
Activity
1w
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
43
Activity
1w
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
2
Views
68
Activity
1w
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
43
Activity
1w
Best way to position game touch controls around the iPhone Duo hinge
For a full-screen game with a Metal/Unreal rendering view and a SwiftUI overlay for touch controls, what is the recommended way to keep interactive controls away from the hinge while still allowing the rendered game world to use the full display? Would you recommend querying ReservedRegion in the SwiftUI overlay while allowing the underlying render view to remain edge-to-edge? Also, should control placement respond continuously while the device is being folded, or primarily respond to layout/reserved-region changes once the pose changes?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
0
Views
20
Activity
1w
Can a non-camera game present supplementary content on iPhone Duo’s outer display?
I’m building a real-time game where the primary gameplay runs on the inner display. I’d like to use the outer display for optional supplementary content such as a scanner, companion view, enemy sensor, or other game information. The current Scene Accessories examples appear centered around CameraCaptureAccessory. Is there a supported API for a non-camera app or game to present arbitrary supplementary content on the outer display while the main game remains active on the inner display? If not currently supported, should developers design the outer-display feature as optional and wait for additional accessory types?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
0
Views
19
Activity
1w