需要防止特定视图控制器上的屏幕旋转
我在下面尝试过 -
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)
没有任何效果.
提前致谢!
需要有透明的导航栏
有什么建议吗?