I have an app with looks at the @Environment(\.horizontalSizeClass) variable
and it's mate vertical.
On the iPhone 16 sim, if I'm in portrait orientation, It says my vertical class is .regular
and horizontal is .compact.
If I rotate to landscape, it says vertical is now compact, and horizontal is still compact. That seems inconsistent.
I'm trying to wrap my head around designing for size class, how am I supposed to think about this?
What I want is two areas of the screen: The main area, which shows a graphic, and a much smaller control and data area, which has a button or two and a very narrow text display, which in my current app counts from 1 to 4. The button area
These areas ought never move from where they are, but their contents ought to rotate in place to reflect the orientation. If portrait, the button area is on the bottom, if landscapeLeft, the button are is to the right, if landscapeRight, the button area is to the left.
This currently sort of works if I test for the max of height or width from a Geometry Reader, but it doesn't handle landscapeRight or portraitUpsideDown correctly.