Centering an Image for the LaunchScreen.storyboard

NPCNPC USMember ✭✭

I've been building a cross platform PCL .Forms app and recently got to focusing on the IOS portion. I've been trying to create a LaunchScreen that is white with a decal in the center.

I managed to center the image how I'd like in the editor, and hit the '+' constraint button that seemed to auto-generate constraints for the image that match my centering from the bottom and left.

However when launched despite being in the center of the editor, the image is nowhere near centered on the actual splash screen. As if the phone is trying to display what is shown on the editor as in image based in one of it's corners rather than the center. How can I get the phone to display the center of the storyboard rather than a corner?

Best Answer


  • BlueCoder77BlueCoder77 USMember ✭✭

    What I found that worked for me was to set content mode to "Center" and then set the image UI control to fill the entire storyboard screen so that the UI control fills the screen and the image is centered inside of that, instead of trying to center the image view in the screen with constraints. I was able to do this in Visual Studio on my windows desktop.

Sign In or Register to comment.