Resize UIImagePickerController video capture interface(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 视频采集界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Resize UIImagePickerController 视频采集界面
基础教程推荐
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01