Resize UIImagePickerController 视频采集界面 [英] Resize UIImagePickerController video capture interface

查看:21
本文介绍了Resize UIImagePickerController 视频采集界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 splitviewcontroller 用于我的 ipad 应用程序,我需要在 detailViewController 中以 530 像素宽和 360 像素高的尺寸捕获视频.我尝试使用 UIImagePickerController 来捕获视频,但我无法更改视频捕获界面的大小.我无法在应用程序中进行全屏视频捕获.有没有办法调整 UIImagePickerController 的视频捕获界面的大小.非常感谢你的回答.很抱歉没有在这里添加屏幕截图.我的声望统计不允许这样做.

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 and 360 px height. I tried using UIImagePickerController for capturing video but i am unable to change the size of the video capture interface. I cannot afford a full screen video capture in the app. Is there a way to resize the video capture interface of UIImagePickerController. Thanks a lot for your answers. Sorry for not adding up an screenshot here. My reputation count doesn't permit it.

推荐答案

据我所知,使用 UIImagePickerController 将无法做到这一点.但是您可以使用 AVCamCaptureManager 和 AVCamRecorder 类轻松完成.Apple 在其开发者网站 这里.它被命名为 AVCam.简单来说就是当你点击打开相机时,它会调用负责打开iPhone相机并录制视频或捕获音频的类和方法.它调用的类与 UIImagePickerController 调用的类相同.

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.

您会在该演示代码中找到一个小的 UIView 对象,该对象显示相机的提要.您可以根据需要调整该视图的大小,并且相机的输入将显示在该区域中.当我想调整相机的输入源并拍摄照片时,它对我有用.我希望它也适用于你.

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.

这篇关于Resize UIImagePickerController 视频采集界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆