Skip to content
iPhone Duo SupportGet help

UIKit on iPhone Duo

Every SwiftUI capability has a UIKit counterpart. Apps built on standard containers adapt with little work.

UIKit is fully supported on iPhone Duo, and every SwiftUI adaptive API has a UIKit counterpart. Apps built on UINavigationController, UITabBarController, and UISplitViewController get most of the adaptation automatically.

What adapts automatically

Standard containers are fully adaptive across all poses. Custom UIToolbar content is not considered for vertical bar placement, so an app that replaced the system bars with its own has more work than one that did not.

The main migrations

UIScreen.main is being deprecated on two-display devices. Read scale from traits and the screen from the window scene:

let scale  = traitCollection.displayScale
let screen = view.window?.windowScene?.screen

Safe area insets are asymmetric, so inset the rectangle rather than doubling one side:

let width = view.bounds.inset(by: view.safeAreaInsets).width

Audit userInterfaceIdiom checks. iPhone Duo reports the phone idiom with a regular-width display, so idiom-gated iPad layouts never appear. See idiom assumptions.

The new UIKit APIs

let arrangementVC = UIArrangementViewController()
arrangementVC.setViewController(playerVC, for: .primary)
arrangementVC.setViewController(upNextVC, for: .secondary)
let regions = view.reservedRegions(kind: .division)

For vertical bars, item.axisBehavior, traitCollection.verticalBarEdge, navigationItem.verticalBarCompressionBehavior, and preferredVerticalBarBehavior control placement, adaptation, compression, and opt-out respectively.

Start with the App Resizability modernization skill in Xcode 27.1, which now covers this migration. See UIKit on iPhone Duo.

Checklist items that apply to UIKit

Open the full checklist