0

I am using Xamarin Studio and have a Xamarin Forms project for both iOS and Android. For my iOS app, I have created a xib file for my launch screen. I have added an image view and and an image to that view. Every time I change the simulated metrics size (in Xcode) the image repositions itself (same if I run on different sized iDevices). How do I correct this? I want the image always centered vertically and about 1/3 of the way down from the top. Thanks

1 Answer 1

1

As mentioned on the Xamarin Launch Screen Guide, if you use a Universal Launch Screen and click Enable Size Classes, then your Launch Screen will automatically scale dependent on the screen size.

I also personally found, that I needed to use Center Constraints for my ´Views` as described here. As mentioned in the guide:

If you choose a horizontal drop area, the constraint will be based on centerX

Hope this helps.


Edit

You may need to open the .xib file in XCode as there is an issue opening Universal Screens in in Xamarin Studio.

Additionally, to enable Size classes in XCode, simply follow this guide.

Sign up to request clarification or add additional context in comments.

5 Comments

Looks promising but the storyboard file won't open in Xamarin Studio for me - just hangs with spinning wait cursor. I will Google this issue shortly. Thanks.
I forgot to mention that you will probably need to use XCode to open the .xib file. There is an issue with loading the universal launch screens in Xamarin Studio.
I tried that but couldn't find enable size classes.
Ah right, forgot to mention it's different in XCode. Please see this guide from Apple's developer portal.
Latest version of XS 9.8 allows editing of the storyboard and the first link above got me "centered". My storyboard consists of 3 items, top to bottom, an image view with image, label1, label2. At runtime, label1 is above the image/imageview, odd? Thanks for your help.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.