ImageView with sizes for all screens

0

I'm developing an application for iOS using Swift 4. What I've broken the head is in relation to the sizes of the screens.

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

But I have a problem that seems simple, but I'm kind of confused:

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

Even though I'm moving the constraints, the image is very small on the iPad. How would you also resize the image and the components according to the screen resolution of the device?

    
asked by anonymous 19.09.2018 / 05:38

1 answer

1

Do you want the image to increase proportionally, according to the device?

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

I do not know if this is it, but I hope I have helped hand.

    
21.09.2018 / 20:52