Here are my views with constraints.
The problem is in landscape mode. For example, the purple view’s height is 58.33(portrait mode), but in landscape mode is 36.33. But on iPad or iPhone 12 pro max, these two are equal.
- Why they are different if the constraints are the same?
- How can I set them to be the same (purple view’s height in landscape mode and in portrait mode)?
2
Answers
The problem was that this storyboard was a container view in the "X" storyboard and the "X" storyboard had several constraints related to this storyboard. That was the problem. :)
Try this out: choose a button and setup its "Content Compression Resistance Priority" to 1000 (Required)
Btw. SceneView is changing during rotation as well. It looks you’ve got other constraints to satisfy with a higher priority taking into account both of these views don’t have a fixed height and completely defined by its content (intrinsic) sizes are subjects for stretching and squeezing when necessary
And first two vertical constraints from a screen look a bit unclear