0

For my Xamarin.iOS project I am using LaunchScreen.Storynboard for showing launch screen. For adding images, I am using asset catalog. My application supports both orientations on iPad. However, when I open imageset in visual studio it shows only one @2x image for iPad which will be occupied by Portrait image. Now, for adding landscape image I have edited its Contents.Json file and added image details there. added image locally and also added its entry in projects .csproject file. However, when I build and run application its only picking one image and applying it to both the orientations. e.g. Its picking landscape image and applying it in both landscape and portrait launch screen image. Now, in portrait mode image is showing vertically stretched. which is causing UI issue.

How to set image for both the orientations in visual studio xcassets imageset?

Any suggestion would be appreciated.

Thank You.

Amirhossein Yari
  • 2,054
  • 3
  • 26
  • 38
DJB
  • 1

1 Answers1

0

How to set image for both the orientations in visual studio xcassets imageset?

LaunchImage ImageSet is the old way which has been deprecated, we don't need to set storyboard or xib on Launch Screen, but it is nothing except image. We can't find a way to set LaunchImage ImageSet in the latest Visual-Studio.

Refer: Xcode 11 UILaunchImages has been deprecated, use launch storyboards instead Warning

Now, in portrait mode image is showing vertically stretched. which is causing UI issue.

You should use auto-layout to layout your image in both landscape and portrait orientation so that it won't be stretched. See document here: Managing Launch Screens with Storyboards :

enter image description here

nevermore
  • 15,432
  • 1
  • 12
  • 30