Arvind Chourasiya
Arvind Chourasiya

Reputation: 17422

Xamarin iOS: Unable to set constraints on Controls from Visual Studio 2017

Here setting constraints enter image description hereI 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 enter image description here

enter image description here

Upvotes: 0

Views: 396

Answers (1)

ColeX
ColeX

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

Related Questions