Traits variations for two target in the same development

Hi there,

I have two targets "A" and "B" in the same development. I did the constraints in IB with Using Targets variations and Vary for Traits.

Results :

Target "A" displays the Main_iPhone.storyboard correctly in full screen on the sim iPhone X...

Target "B" displays the Main_iPhone.storyboard incorrectly (like a iPhone 8+ for example) on the sim iPhone X...

The question is : why do they display differently 😕 ?


https://www.judogokyo.com/ftp/wrongDispaly.png

Replies

Impossible to say without knowing what constraints are in place at runtime.


When you use Xcode’s view debugger, what does it say about what constraints are active? Do you have auto layout warnings in the console? What are the dimensions of the main screen that the app sees? (Maybe target B doesn’t have the right launch storyboard or images)

Could you explain as well what Target A and B are ?


Is it only on simulator or also on device ?