iosios8autolayoutiphone-5iphone-6

How to create different constraints for iphone 5 and iphone 6


Is it possible to create a constraint specifically for iPhone 4s and 5s without affecting iPhone 6?

prototype

Please see image above:

The scrollview's height is with equal height with the content view. I changed the multiplier to make it 40% of the actual height of the cell.

The cell is a fix height, the same height as the main window.

If you can see on the preview on the left, there is really no space for 5s and 4s devices. So I wonder on how to approach this design issue.


Solution

  • Please try to use aspect ratio for all views with window view. It will calculate screen size and it will align automatically to satisfy your constraint. I had the same problem, i overcame by setting aspect ratio.

    please look this, link http://mathewsanders.com/designing-adaptive-layouts-for-iphone-6-plus/