iOS how to handle image upscaling,downscaling,image stretching and other issues

71 Views Asked by At

I have an image which is completely red but there is a small line which is white in color and mid of the screen.But the line disappears as its getting downscaled I believe.

so if I my imageview width is 20 by 20.my 1x image should be 20* 20 and my 2x image should be 40 by 40 and my 3x image should be 60 by 60.

if I want to vector way then I can use pdf images which is of 20 by 20 and keep it 1x and it will be get scaled up to 40 for 2x and 60 for 3x.

Please correct me if I am wrong.

When I try to show image on bigger imageview of width and height as 300 by 200 then sometimes image gets stretched. how can I avoid that ? Have to maintain the image aspect ratio width and height w.r.t imageview.

I have heard using aspect fit content mode can solve the image stretch issue.

somebody please clarify me as other answers in stack overflow leads to bit more confusion.

Cheers

0

There are 0 best solutions below