Ios Swift设置代码中特定屏幕的方向
我希望以编程方式设置ViewController方向,在解除ViewController后,我希望方向返回到上一个模式 这是我目前使用的:Ios Swift设置代码中特定屏幕的方向,ios,swift,uiviewcontroller,Ios,Swift,Uiviewcontroller,我希望以编程方式设置ViewController方向,在解除ViewController后,我希望方向返回到上一个模式 这是我目前使用的: if(GamePrefrences.orientation == "landscape") { value = UIInterfaceOrientation.LandscapeLeft.rawValue } else { value = UIInterfaceOrientation.Portra
if(GamePrefrences.orientation == "landscape")
{
value = UIInterfaceOrientation.LandscapeLeft.rawValue
}
else
{
value = UIInterfaceOrientation.Portrait.rawValue
}
您可以覆盖的preferredInterfaceOrientationForPresentation
一种视图控制器,用于在屏幕上全屏显示
具体方向
您可以覆盖的preferredInterfaceOrientationForPresentation
一种视图控制器,用于在屏幕上全屏显示
具体方向
您可以覆盖的preferredInterfaceOrientationForPresentation
一种视图控制器,用于在屏幕上全屏显示
具体方向
您可以覆盖的preferredInterfaceOrientationForPresentation
一种视图控制器,用于在屏幕上全屏显示
具体方向
检查这个检查这个检查这个检查这个