Imageview with sizes for all screens

Asked

Viewed 131 times

0

I am developing an app for iOS using Swift 4. What I have broken my head is in relation to screen sizes.

I see that Auto Layout helps in some cases, among them, disposition of the elements in Portrait and Landscape.

But I have a problem that seems simple, but I’m a little confused:

I have an image that will be Logo and would be on top, centered. When I put in a resolution on iPhone 4s gets one way, on iPhone 7 another and so on.

Even if I touch the constraints, the image is too small on the iPad. How to resize the image and the Components according to the screen resolution of the device?

1 answer

1

You want the image to increase proportionally, according to the device?

I believe that if you put to keep the resolution (Aspect Fill or Aspect fit) in the image, and also, when placing the constraints (at least 3 constraints in the image) select the option "Aspect Ratio" it increases or decreases, according to the size of the device, maintaining its proportion and resolution.

I don’t know if that’s it, but I hope I helped bro.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.