Leo.Han Leo.Han - 1 year ago 82
iOS Question

How to make iOS ImageView full match window?

enter image description here

I am new in iOS , I am an android developer self-learing iOS just for fun.
As you can see from the picture , I want to make my ImageView full-displayed in the window in different inch iPhone.
If you are an android developer, you may know what I mean is how to make ImageView match_parent in both width and height?
Thank you very much for your answer.

Answer Source

You must set the UIImageView Constraints, like this to adjust in the full screen, 0 spacing in all sizes, and click in Add 4 Constraints

enter image description here

After that, you must check in the UIImageView settings the mode to Aspect Fit, so it will keep the aspect ratio of your image.

I Took the image from your print, here is the expected final result.

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download