Launch screen storyboards: is there a way to differentiate iPad orientations?

darshJ 1 Reputation point
2021-01-06T12:08:45.963+00:00

I am using Lauchscreen.storyboard for displaying splashscreen in my iOS application. I have added images in Assets.xcassets->LaunchImage.imageset.
I have set portrait image in the placeholder. However, the image is different when the app is launched in landscape on an iPad.
So is there any way to differentiate between an iPad in portrait and an iPad in landscape when using a an Adaptive storyboard for a launch screen? Because it's a launch screen I can't run any code, it would have to be done completely through the storyboard.

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JarvanZhang 23,971 Reputation points
    2021-01-06T14:41:36.667+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    You could specify different images for the splash screen, set one for the portrait orientation and one for landscape in Assets. The use the Edit Traits button to add constraints for specific size size classes. Check the doc.

    Similar issue: https://stackoverflow.com/questions/51101331/xamarin-forms-ios-change-splash-screen-depending-on-screen-orientation

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.