调整UIImagePickerController视频捕获界面的大小 [英] Resize UIImagePickerController video capture interface

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

问题描述

我在我的ipad应用程序中使用 splitviewcontroller ,我需要在维度中的 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.

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

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