【发布时间】:2013-07-27 16:46:47
【问题描述】:
在 Mac OS X 上使用 Xamarin 4.0.10 和最新版本的 MonoGame for iOS。 我的横向方向有问题。
MonoTouch.Foundation.MonoTouchException:抛出 Objective-C 异常。 名称:UIApplicationInvalidInterfaceOrientation 原因:支持 方向与应用程序没有共同的方向,并且 shouldAutorotate 返回 YES
如果我添加 Portait 方向,一切都很好。但我只需要横向。
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferHeight = 640;
graphics.PreferredBackBufferWidth = 960;
graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight;
graphics.ApplyChanges ();
Content.RootDirectory = "Content";
graphics.IsFullScreen = true;
这个问题是在game.Run()方法上启动构造函数Game1.cs后出现的
【问题讨论】: