You may be encountering a bug or an unexpected behavior in Xcode Simulator. However, without examining your code directly, it's difficult to determine the exact cause of the issue. Here are a few things you can check and potential solutions to try:
Ensure that you're correctly using the size classes in your SwiftUI code. Make sure you are accessing the size classes from the environment variables and updating your UI accordingly. For example, you can access the size classes using @Environment(\.horizontalSizeClass) and @Environment(\.verticalSizeClass).
Verify that you are using the correct size class values when adapting your UI to different orientations. The values reported by the simulator may not match the sizes mentioned in the Human Interface Guidelines you referenced, as those guidelines may not be updated for the latest simulator versions. You can use the simulator to test and determine the correct behavior for different device orientations.
Consider updating Xcode to the latest version available. The issue you're experiencing may have been addressed in a newer release. Checking for updates and installing them may help resolve the problem.
If you suspect it may be a bug in Xcode, you can try running your app on a physical device to see if the behavior persists. Testing on an actual device can help determine if the issue is specific to the simulator or if it's a broader problem.
Remember to always keep your development environment up to date, as new updates may include bug fixes and improvements that can resolve issues you're experiencing.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: