简体   繁体   中英

How to set launch screen in Xamarin iOS to images in Assets.xcassets directory?

I need to set up a launch screen for a Xamarin iOS app (part of Xamarin Forms app), I'm following this tutorial , but there I can only set the launch screen to only one image, I want to make sure that it will be displayed the same across all devices. I have added all sizes required in the Asset Catalogs> Assets> LaunchImages

在此处输入图片说明

and set the the Launch Screen to LaunchScreen in the Info.plist but the assets images are not available in the image drop-down list (only images in the same directory of the LaunchScreen.storyboard), so, the LaunchScreen dosn't have access to the assets folder of the Asset catalogs!

Any help?

Do not add the images you want to use to an asset catalog. Instead, add the images directly to your project and make sure you have them included in the target. You have to go back to the old "image.png", "image@2.png", "image@3.png" naming convention in order to supply different images for different screen sizes.

Another possible solution:

If you add an image set to an asset catalog, those images should be available in your launch screen storyboard. Add an Image View to the view controller in the storyboard, select the image, open the Properties Pad, and set select the image the asset catalog in the Image drop-down list.

For more information visit this

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM