简体   繁体   English

启用物理设备块(Swift)时如何拦截 ios 旋转?

[英]How intercept ios rotation when physical device block is enabled (Swift)?

I need to straight up the image taken by custom camera capture view but with physical device rotation block enabled it seem impossible.我需要整理自定义相机捕获视图拍摄的图像,但启用物理设备旋转块似乎是不可能的。

physical device rotation block物理设备旋转块

UIDevice.current.orientation works only with device rotation "unlocked". UIDevice.current.orientation仅适用于“解锁”设备旋转。 Someone can help me with this tedious bug?有人可以帮我解决这个乏味的错误吗? Thanks.谢谢。

Unfortunately there is no way to unlock rotation while physical block enabled, but you can turn landscape mode as your main in project settings不幸的是,启用物理块时无法解锁旋转,但您可以在项目设置中将横向模式作为主要模式

landscape mode as main横向模式为主

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM