I used this answer (XCode: How to change layout of views between landscape and portrait mode) in order to create a storyboard that stacks an Image View and Table View on top of each other in portrait mode and side by side in landscape mode. Everything works great in Xcode when I change the orientation. Additionally, it works great on the simulator for an iPhone 11. However, when I install and run on my physical iPhone X, the portrait mode displays fine, but when going to landscape, the side by side display appears to fly off the screen and all I see is the navigation bar. I've also reproduced this without the navigation bar.
I apologize in advance if the screenshots I'm including are insufficient to troubleshoot this issue and am happy to provide anything else.
Below are the screenshots showing the varying constraints (and common ones) for each orientation.
Steps to create were:
- Add an image view to the View Controller of a new project.
- In portrait orientation click "Vary for Traits", select both "Height" and "Width".
- Add leading, top, and trailing constraints and a height.
- Click "Done Varying"
- Change orientation to landscape
- In landscape orientation click "Vary for Traits", select both "Height" and "Width".
- Add leading, top, and bottom constraints and a width.
- Click "Done Varying"
- Works on storyboard and simulator
- Doesn't work on physical device


