-1

I'm using Xcode 13. I added a variation for a constraint so that when the device's orientation is changed to landscape (Regular-width and Compact-height).

Inside the Xcode I'm using iPhone 11 as demo device. enter image description here

And when I actually run it on iPhone 11 simulator, it works fine.

But when I tried running it on other simulators with different screen sizes, like iPhone 12 and 13 Pro, it doesn't work. enter image description here

Does that mean inside Xcode I'll have to provide different constraints for all different screen sizes individually ? Or is there a way to do it once and for all ?

robben
  • 637
  • 1
  • 7
  • 14
  • check this https://stackoverflow.com/questions/46317061/how-do-i-use-safe-area-layout-programmatically – udi Sep 12 '22 at 13:06

1 Answers1

1

You need to make sure that you have created the constraint with safeArea layout guide an not to superview

enter image description here

Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87