Manish Jain Manish Jain - 1 year ago 108
iOS Question

uiimageview aspectfill issue

I have layout with multiple imageviews, which look perfect with Mode->Aspect Fill as below.

enter image description here

now my situation is when I run the same, the whole layout just break into peaces.

enter image description here

Answer Source

For each of your UIImageView make sure to enable clipSubviews in Interface Builder.

Clip Subviews

What happens is that your views are positioned and sized properly, but since the contained image is bigger than the containing view it will bleed out outside of the view boundaries.

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