Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to set an imageview to center in iOS Launchstoryboard?

RezaMohamedRezaMohamed USMember ✭✭✭

I am simply trying to set an image to center across all devices in the Xamarin Forms iOS LaunchStoryboard. Documentation on how to do this is very sparse or lacking. Can someone please help? I tried to follow along to this post, but I do not see the Autosizing option. https://forums.xamarin.com/discussion/153929/ios-storyboard-launchscreen-image-width-constraint-to-superview

Best Answer

  • RezaMohamedRezaMohamed USMember ✭✭✭
    Accepted Answer

    Finally figured it out, in case anyone else runs across this issue here is what I did:

    In the Launch Storyboard, click the Constraint Editor option

    Click the center, press ctrl and drag the mouse down a little and let go

    Do the same to the right side of the image

    Then click the I bars on each side of the image and choose Height and Width

    You should have four constraints now in the Properties/Layouts window

    And that's it! It took me about two days just to figure all this out so hopefully, you don't have to waste so much time.

Answers

  • RezaMohamedRezaMohamed USMember ✭✭✭
    Accepted Answer

    Finally figured it out, in case anyone else runs across this issue here is what I did:

    In the Launch Storyboard, click the Constraint Editor option

    Click the center, press ctrl and drag the mouse down a little and let go

    Do the same to the right side of the image

    Then click the I bars on each side of the image and choose Height and Width

    You should have four constraints now in the Properties/Layouts window

    And that's it! It took me about two days just to figure all this out so hopefully, you don't have to waste so much time.

Sign In or Register to comment.