iosiphonexcodeautolayoutadaptive-layout

How to deal with adaptive layout in Xcode


I'm new to iOS development and I'm having some issues with the auto layout feature in Xcode 7. enter image description here

As the image attached, my circle progression view doesn't scales fine for the 3.5" iPhone and it certainly looks fine with the other size classes.

Is there a minimum size limit for UIView in Xcode?

Also there are two text label in the circle view and no matter how I constraint them, their size just won't change across iPhone size classes.

As you might notice I have a SOS button which is a button embedded with an image I designed. I have added some constraints similar to the circle progression view but it doesn't work at all.

Is there any good guides/tutorial where it specifically teaches how to manage iOS element sizes across all iPhone size classes?


Solution

  • You can set the controls heights and the spacing bitween them to be related to the main view height. That will make them shrink little bit in 3.5 inches screen. You can then play around the constraints values to find the most convenient to you. like this enter image description here