I want this to work on all iPhones from 4 to 6+ portrait only.
Look at this autolayout designed for iPhone 4:
This imageView has an aspect ratio of 49:59 and has to keep this constant.
The imageView is inside a UIView container (the orange box). The orange container is attached to the 4 corners with 0 space. On the bottom part of the interface, another container (the white one) that contains 4 sliders.
This is the constraints I have applied to that imageView: top, bottom, leading, trailing to the orange container and aspect ratio 49:59.
This is how it scales to other iPhone screens:
but I don't want that. Look of how much screen is wasted on bigger iPhones.
What I want is the imageView to scale until it touches the left and right borders.
I want this:
There is plenty room for the view to scale and touch the left and right borders on big iphones while still keeping the same aspect ratio.
What kind of constraints should I apply to the imageView to do that? I have tried everything.