2013-07-27 24 views
2

Mac OS X上使用的Xamarin 4.0.10和最新版本的MonoGame適用於iOS。 我有橫向方向的問題。適用於MonoGame的iOS橫向導航問題

MonoTouch.Foundation.MonoTouchException:拋出了Objective-C異常。 名稱:UIApplicationInvalidInterfaceOrientation原因:支持 方向與應用程序中沒有共同的方向,並 shouldAutorotate將返回YES

如果我添加波泰特取向,一切都很好。但我只需要橫向方向。

graphics = new GraphicsDeviceManager(this); 
graphics.PreferredBackBufferHeight = 640; 
graphics.PreferredBackBufferWidth = 960; 
graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight; 
graphics.ApplyChanges(); 
Content.RootDirectory = "Content"; 
graphics.IsFullScreen = true; 

這個問題開始構造Game1.cs後,出現在法game.Run()

回答

0

開放的Info.plist在Xamarin Studio和檢查「山水左」和「右景觀」定向「支持的設備方向「。