2017-02-28 137 views
1

我有啓動畫面的問題。我用圖像創建故事板。在設計師看起來不錯,但在模擬器上發生了一些可怕的事情,比如this。我無法理解它的工作原理。有人可以解釋嗎?還有一個問題:如果可能,如何在故事板或xib中爲不同的語言實現不同的圖像?Xamarin.IOS景觀啓動屏幕

回答

0

你需要做一些事情。

首先,你需要告訴的plist文件的應用程序,這將是景觀

enter image description here

你要顯示的圖像配置您推出屏幕故事板。如果您想根據語言顯示不同的圖像,則需要本地化圖像。

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

這應該工作。