Xamarin.ios 找不到MonoTouch支持的接口方向

Xamarin.ios 找不到MonoTouch支持的接口方向,xamarin.ios,screen-rotation,Xamarin.ios,Screen Rotation,在带有SDK 6.1的MonoTouch 6.0.10中,我在tabbarcontroller和navigationcontroller中具有以下功能: public override bool ShouldAutorotate() { return true; } public override UIInterfaceOrientationMask SupportedInterfaceOrientations() { var orientations = ParentView

在带有SDK 6.1的MonoTouch 6.0.10中,我在tabbarcontroller和navigationcontroller中具有以下功能:

public override bool ShouldAutorotate()
{
    return true;
}

public override UIInterfaceOrientationMask SupportedInterfaceOrientations()
{
    var orientations = ParentViewController.GetSupportedInterfaceOrientations();
    foreach ( var controller in ViewControllers )
        orientations = orientations & controller.GetSupportedInterfaceOrientations();
    return orientations;
}
在AppDelegate中,我有:

public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations (UIApplication application, UIWindow forWindow)
{
    return UIInterfaceOrientationMask.All;
}
在最后的发射中,我有:

window.RootViewController = tabController;
在tabbarcontroller和navigationcontroller中,这会得到一个错误,其形式为“HelloWorld.TabController.SupportedInterfaceOrientions()被标记为重写,但找不到合适的重写方法(CS0115)。”

任何建议,谢谢


Bill.

UIViewController
定义了
GetSupportedInterfaceOrientations
,您可以在
UIAbbarController
UINavigationController
子类中覆盖这些接口方向


C#编译器错误消息(以及您的代码)显示您缺少
Get
前缀。

谢谢。你比我快。我们在南半球有点慢。嗨,我也有同样的问题。你能解释一下你是如何解决你的问题的吗。