iPhone Duo: verticalSizeClass remains regular when pinned Picture in Picture reduces app window height to 348 points

I’m testing a SwiftUI app on the iPhone Duo simulator running iOS 27.1 and have noticed some unexpected behaviour when using pinned Picture in Picture.

When the device is unfolded in portrait and a PiP video is pinned to the top of the display, the available app height drops significantly, but verticalSizeClass remains .regular.

For comparison, these are the values reported by GeometryReader:

ConfigurationAvailable size (pt)HorizontalVertical
Unfolded landscape867 × 611.regular.regular
Unfolded portrait669 × 786.regular.regular
Unfolded portrait + pinned PiP669 × 348.regular.regular

I’d expected the vertical size class to become .compact when pinned PiP reduces the available height to approximately 348 points.

Is this intentional behaviour, with size classes remaining tied to the unfolded display configuration rather than the available app window dimensions, or is it potentially a bug in iOS 27.1?

I’m currently working around it by checking the available geometry directly, but I’d be interested to know what the recommended approach is for adapting SwiftUI layouts in this configuration.

Ignore this reply - tables preview fine but dont post fine

Thank you for the post. So you are using Xcode 27.1 instead of Xcode 27.2 RC?

Any chance to provide a simple focused sample to see what you are doing?

If you're not familiar with preparing a test project, take a look at
Creating a test project.

Are you using .verticalSizeClass at with onGeometryChange, onGeometryChange does not affect layout sizing the way GeometryReader does, yet @Environment(.verticalSizeClass) == .compact will automatically adapt and I use that most of the time now. Well Checking raw dimensions inside a GeometryReader works.

If you have something engineers here can look at will make it easier instead of guessing.

Thanks

Albert  WWDR