Cannot set LaunchImage as source of Image View control on LaunchScreen.storyboard

dswdsw Member ✭✭

I'm working on a mobile app for iOS/Android. I'm using Visual Studio Community for Mac version 8.1.5, and the project was initially created as a new Tabbed Forms Xamarin App. I'm new to mobile development and Xamarin.

When the new project was created, the Assets.xcassets "folder" already contained two items - AppIcon and LaunchImage.

I didn't create this, it already existed. There was also a LaunchScreen.storyboard file, and in the info.plist file, the iPhone Launch Images setting was already set to LaunchImage (the name of the image set in xcassets that already existed and which is shown in the screenshot above), and the Launch Screen setting was set to LaunchScreen.

I then added a bunch of images to a subfolder in the Resources folder, added each image to the correct box in the xcassets screen, saved everything and then tried to add an image to the LaunchScreen.storyboard file.

Unfortunately, when I add an Image View control to the Launch Screen, the Image dropdown in the widget properties does not list the LaunchScreen as an asset I can use!

If I create a new Image Set in the xcassets folder, it creates a screen with placeholders only for 1x, 2x, R4, and 3x

This has nowhere near the number of different images sizes (I guess because it's a general image, not an image specifically for the launch screen), but, I can set the Image View on the launch screen to use this set.

So my question is: how can I use the LaunchImage screen (with its many different sizes for different devices) as the source of an Image View widget on the LaunchScreen story-board? What am I missing?

Best Answer

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    Unfortunately, when I add an Image View control to the Launch Screen, the Image dropdown in the widget properties does not list the LaunchScreen as an asset I can use!

    It was a known issue but seems it has been fixed , the dropdown list all the image in Resource folder or assets on my side . Please post detailed version information here .

    how can I use the LaunchImage screen (with its many different sizes for different devices) as the source of an Image View widget on the LaunchScreen story-board?

    iOS doesn't like android , we don't need hdpi/xhdpi/xxhdpi/.. image here , x1, x2 ,x3 image is designed for different resolution ,refer Image Size and Resolution .

    We use autoLayout to set constraint on control to determine its position and size .

    About how to set image in launch screen ,check Launch Screens for Xamarin.iOS Apps

  • dswdsw Member ✭✭

    Hey, thanks for the reply :)

    It was a known issue but seems it has been fixed , the dropdown list all the image in Resource folder or assets on my side . Please post detailed version information here .

    The dropdown lists all of the individual images in the Resource folder, but I don't want to use the individual images directly, I want to use the LaunchImage set, so that the right image can be used for the right device.

    What version info will help? I'm using Xamarin.Forms 4.0.0.497661, Xamarin.Essentials 1.1.0, and Xamarin.Forms.Visual.Material 4.0.0.497661

    We use autoLayout to set constraint on control to determine its position and size.

    I will take a look at AutoLayout

    About how to set image in launch screen, check Launch Screens for Xamarin.iOS Apps

    Yep, I've read that already, it shows how to use manually created ImageSet, but not default (default as in created with the new project, n0t created manually) LaunchImage set

  • ColeXColeX Member, Xamarin Team Xamurai
    edited July 16

    I want to use the LaunchImage set, so that the right image can be used for the right device.

    We set LaunchImage in Assets for each of the various device form factors and resolutions before , but it is not recommended after iOS8 , set launch screen with storyboard is a better way .

    Do you want the full screen image ?

  • ColeXColeX Member, Xamarin Team Xamurai

    Check my answer for how to set full screen image : https://forums.xamarin.com/discussion/comment/367825/#Comment_367825

  • dswdsw Member ✭✭

    set launch screen with storyboard is a better way .

    That's what I'm trying to do! It just seems pointless to provide an ImageSet in xcassets called LaunchImage, but then not be able to add this set to a LaunchScreen.stroyboard...?

Sign In or Register to comment.