简体   繁体   中英

Xamarin.IOS Landscape launch screen

i have a problem with launchscreens. I create a storyboard with image. At designer it looks great, but on simulator happen something terrible, like this . I can't understand how it works. Can somebody explain it ? And one more question: how implement different images at storyboard or xib for different languages, if it is possible?

You need to do a few things.

First you need to tell the app in the Plist file that it will be landscape

在此输入图像描述

Configure your launch screen storyboard with the image you want to show. If you want to show a different image based on the language then you need to localize the image.

In the AppDelegate override the method below to allow the app return to the "normal" orientation when it has finished launching:

    public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations(UIApplication application, UIWindow forWindow)
    {
        //select the option you need here
        //if you only wants portrait use this: UIInterfaceOrientationMask.Portrait
        return UIInterfaceOrientationMask.AllButUpsideDown;
    }

This should works.

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