 <p>To have the image stick to both sides of screen and maintain the aspect ratio, set these 4 constraints:</p> <ol> <li>Leading Edge of ImageView to Leading Edge of SuperView.</li> <li>Trailing Edge of ImageView to Trailing Edge of SuperView.</li> <li>Top Edge of ImageView to Top Layout Guide Bottom.</li> <li><p>Set an aspect ratio constraint: ImageView Width equal to ImageView Height with <code>multiplier</code> <code>480:640</code>. To set this, <kbd>control</kbd>-drag diagonally in the ImageView and select <em>Aspect Ratio</em> from the pop-up. Then change the multiplier to <code>480:640</code>.</p> <p><a href="https://i.stack.imgur.com/EywxN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EywxN.png" alt="aspect ratio constraint"></a></p></li> </ol> <p>Set the content mode for the image to <code>Scale to fill</code>.</p>