Intermittent UIHostingController layout regression after app launch on iPadOS 27 beta 4

On iPadOS 27.0 beta 4, SwiftUI views hosted inside UIKit-managed containers/overlays can be laid out incorrectly. The same app and same code work correctly on iPadOS 26.x release versions.

One visible example is the app’s About dialog. The dialog is implemented as a UIKit UIViewController presented with UIModalPresentationFormSheet. Inside that controller, a UIHostingController is added as a child view controller, and the hosting controller’s view is constrained to all four edges of the parent view. The SwiftUI root view is a VStack containing the app icon, app name, version, text, links, and buttons.

Expected behavior: The SwiftUI content should be vertically centered inside the form sheet. The app icon should appear above the app title, followed by the version, text, links, and buttons. This is the behavior on iPadOS 26.x.

Actual behavior on iPadOS 27.0 beta 4: When the About dialog is opened immediately after launching the app, this issue occurs intermittently. The form sheet itself appears, but the SwiftUI content is shifted upward. The app icon is missing or clipped, the title starts too close to the top edge of the sheet, and a large empty area appears at the bottom of the sheet.

This is not limited to the About dialog. Similar layout issues can also appear in other SwiftUI-hosted UI surfaces in the app.

The issue also appears to be affected by system-level UI changes:

  • If I put the app into windowed mode and resize the whole app window, the layout inside the dialog recovers and becomes correct.
  • The issue only occurs with some probability the first time this dialog is opened after launching the app.
  • After the layout is restored by resizing the app window, the issue does not appear again as long as the app process is not terminated.
  • This suggests the problem may be related to an incorrect initial layout pass, cached geometry, trait/safe-area propagation, or UIHostingController layout invalidation after the app/window scene is first created.

Environment:

  • Device: iPad
  • OS with issue: iPadOS 27.0 beta 4
  • OS without issue: iPadOS 26.x release
  • App: VoidLink - Extreme
  • UI stack: UIKit containers/overlays hosting SwiftUI through UIHostingController

Relevant code:

Attachments:

  • IMG_0291.PNG: correct layout on iPadOS 26.x
  • IMG_0292.PNG: incorrect layout on iPadOS 27.0 beta 4

Intermittent UIHostingController layout regression after app launch on iPadOS 27 beta 4
 
 
Q