我一直用它来改变方向
if (UIDevice.current.orientation == UIDeviceOrientation.portrait)
如何用UIInterfaceOrientation.portrait
以上语法替换它。这是因为UIDeviceOreientation
hasfaceup
和facedown
对我没有用。
您可以将其替换为下面的行
if (UIApplication.shared.statusBarOrientation == UIInterfaceOrientation.portrait)
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句