Reputation: 307
Hi there I am currently trying to get the following Scene to scale correctly for any scene.
This is currently how it looks on a iPhone 7 Plus:
I managed to get it to scale the blue background correctly by adding the following constraints:
However, I don't know how to get the UIImageView, UITextField and UI Label to scale in the same way. I Want them to keep the same proportions as they have now on the iPhone 7 view. I have looked for youtube tutorials but none seem to show how to introduce a way to have these items scale as I want them to.
Any help is much appreciated, Thanks.
Upvotes: 0
Views: 143
Reputation: 156
You can add constraints between UIImageViews, Labels, the window, etc. by holding control
and clicking-and-dragging between two elements. For example,
UIImageView: add these constraints:
You can use this same idea to constrain the Label and Text Field to the left side of the window and to keep the vertical spacing between the UIImageView, Label, and Text Field consistent on all devices.
Upvotes: 1