【问题标题】:Xamarin.IOS Landscape launch screenXamarin.IOS 横向启动屏幕
【发布时间】:2017-07-19 17:57:32
【问题描述】:

我的启动屏幕有问题。我用图像创建了一个故事板。在设计师那里看起来很棒,但在模拟器上发生了一些可怕的事情,比如this。我无法理解它是如何工作的。有人可以解释一下吗?还有一个问题:如果可能的话,如何在 storyboard 或 xib 上为不同的语言实现不同的图像?

【问题讨论】:

    标签: ios xamarin.ios storyboard xib launch-screen


    【解决方案1】:

    你需要做一些事情。

    首先你需要在 Plist 文件中告诉应用它是横向的

    使用您要显示的图像配置您的启动屏幕故事板。如果您想根据语言显示不同的图像,则需要对图像进行本地化。

    在 AppDelegate 中重写下面的方法以允许应用在完成启动后返回“正常”方向:

        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;
        }
    

    这应该可行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-18
      • 2022-11-13
      • 1970-01-01
      相关资源
      最近更新 更多