Reputation: 17422
Here setting constraints
I want to set constrains on
UIImageView
so as to control look fit in all screens.
After switching to Constraint Editing Mode I set contraints for device 1 (say iPhone X), Than I am selecting another device (say iPhone SE) and setting constraints for it. Now when I switch layout for iPhone X it got disturbed, How can I set constraints properly. I am using Visual Studio 2017 in Windows machine connected to MAC through network.
Please see the attached screenshots. 1st iphone X and 2nd iPhone SE
Upvotes: 0
Views: 396
Reputation: 14475
Make sure that you have set the sufficient constraints on that imageView. To make the image center in the view , you should define its position and size.
###Align:
CenterX to:Superview=0
CenterY to:Superview=0
###Size:
Width=something
Height=something
Then you can see the same effect on that image with all kinds of devices.
Upvotes: 1