Xcode 7 auto layout view disappearing act

Hi there,


Just need to understand if this is a bug or if I'm doing something wrong. In the screenshot you can clearly see I have 3 views. However in the preview for the small iPhone screen, the top view isn't showing. I've been sitting all weekend trying to build a very simple interface but couldn't get it right. Either it displays correctly on a 3.5 inch screen and incorrectly everywhere else, or it displays correctly everywhere else, except on the 3.5 inch screen. I've only picked this up when I decided to build a simple screen such as the one in the screenshot.


PS: I have tried to play around with the compression resistance settings, but didn't really pick up any differences.


Can someone please help me understand this?


http://imgur.com/dP9Dx0h (screenshot)


Thanks

Does it do the same on a real device, or even the simulator?


Regardless, it's impossible to say without knowing what constraints you have. You can dump these at runtime using UIView's -constraintsAffectingLayoutForAxis: method.


Also, you may have to define "correctly". What do you want the sizes to be on each screen size?

Xcode 7 auto layout view disappearing act
 
 
Q