小编Nik*_*ane的帖子

Xamarin iOS防止特定viewcontroller的旋转

需要防止特定视图控制器上的屏幕旋转
我在下面尝试过 -

    public override bool ShouldAutorotateToInterfaceOrientation(UIInterfaceOrientation toInterfaceOrientation)
    {
        return false;
    }


    public override bool ShouldAutorotate()
    {
        return false;
    }


    public override UIInterfaceOrientation PreferredInterfaceOrientationForPresentation()
    {
        return UIInterfaceOrientation.Portrait;
    }


    public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations()
    {
        return UIInterfaceOrientationMask.Portrait;
    }
Run Code Online (Sandbox Code Playgroud)


没有任何效果.

提前致谢!

rotation xamarin.ios auto-rotation

1
推荐指数
1
解决办法
2001
查看次数

0
推荐指数
1
解决办法
1715
查看次数