我在Xcode9.2和Xcode9.3中运行代码时没有做任何更改。显然,设备方向在Xcode9.3中运行不正确。调用了SupportedInterfaceOrientations,但设备仍旋转为纵向。有人能帮上忙吗?
- (BOOL)shouldAutorotate
{
return YES;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}发布于 2018-11-09 22:49:45
检查ViewControllers层次结构。也许你有一些接受不同旋转模式的父或子视图控制器。
https://stackoverflow.com/questions/50966674
复制相似问题