UIImagePickerController录制视频的坑

需求:要求横屏拍摄视频。

拍摄视频有两种方式:

方式1:UIImagePickerController

使用UIImagePickerController调用系统的相机来录制视频,进去后默认是竖屏的拍摄;查看了下苹果官方文档:
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.

说的是UIImagePickerController只支持竖屏拍摄模式。
so, 只能使用AVFoundation来定制一个只有横屏的拍摄模式。

方式2:AVFoundation

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容