Resize UIImagePickerController video capture interface

前端 未结 2 1811
抹茶落季
抹茶落季 2021-01-06 19:43

I am using splitviewcontroller for my ipad application in which I need to capture video in the detailViewController in a dimension of 530 px width

2条回答
  •  没有蜡笔的小新
    2021-01-06 20:19

    You won't be able to do so using UIImagePickerController as far as I know. But you can do it easily using AVCamCaptureManager and AVCamRecorder classes. Apple has a demo program build on its developer site here. It is named AVCam. In simple words what it does is when you click to open the camera, it calls the classes and methods which are responsible for opening the iPhone's camera and record video or capture audio. It calls the same classes which are called by UIImagePickerController.

    You'll find a small UIView object in that demo code which displays the camera's feed. You can resize that view as per the size you want and the camera's input will be displayed in that much area. It worked for me when I wanted to resize the camera's input feed and capture photos. I hope it works for you as well.

提交回复
热议问题