我在 ViewController( Collection View )中使用 UIImagePickerController。
旋转设备时,我在图片下方遇到一些错误。
1.肖像模式:可以。
2.横向模式:可以。
3.选择操作表:UIImagePickerController:就可以了。
4.选择相机胶卷:自动旋转为纵向
5.相机胶卷上触摸取消:mainViewController自动旋转到纵向
我想要
1) 当触摸相机胶卷时,它会以横向模式显示
2)触摸取消后返回mainView,mainView显示Landscape
附言该项目可以横向和纵向,此问题仅发生在横向上。
谢谢你,对我的英语感到抱歉。
最佳答案
请阅读DOCUMENT明明说只支持PORTRAIT MODE
IMPORTANT
The UIImagePickerController class supports portrait mode only. This class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified, with one exception. You can assign a custom view to the cameraOverlayView property and use that view to present additional information or manage the interactions between the camera interface and your code.
因此,当您进入照片库时,它将处于纵向模式,当选择图像或取消时,它将返回到您之前使用的任何模式。
关于ios - UIImagePickerController 错误旋转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23127417/