mm24
mm24

Reputation: 9596

Failing to understand any-regular-compact constraints in Interface builder

I have set my constraints in interface builder's Main.storyboard to compact(w) regular(h), however the view gets displayed in an inconsistent way (see image below).

enter image description here

Compact and regular says that it should fit all iPhone potrait modes. I don't understand why it does not fit my iPhone 5 simulator and why it appears differently.

As you can see from the image I also tried to put the view elements with a "placeholder" constraint.

Upvotes: 0

Views: 152

Answers (1)

Dipen Patel
Dipen Patel

Reputation: 933

You need to set constraints to your view. A very good tutorial you can find from :http://www.brianjcoleman.com/autolayout-xcode6/

Set the left & right constraint as you can see in the image.enter image description here

Upvotes: 1

Related Questions