I have a UIImageView with an image attached to it. I'd like to display it centered both vertically and horizontally in a way that looks the same on all iPhones, no matter if it's iPhone 5 or 6S Plus.
By 'look the same', I mean the UIImageView should take 80% of screen width and height. Is it possible to achieve that using constraints only (no code)?
With size classes enabled, the canvas size is a fixed 600 by 600 points. What if I set a constraint that says (make sure the top of my image view is located 20 points from the upper margin). How does it translate to real pixels on the device? I've heard that on non-retina display it is 20 pixels, on newer its 40 and 60 respectively (2x, and 3x on 6S).
So is it true that ideally, I shouldn't actually specify the constraints with specific values (in points), but rather use fractions, right? 20 points on iPhone 5 is a different fraction of screen width than on for instance iPhone 6S Plus.