UIImagePickerController

UIImagePickerController

本文介绍了如何显示带有/用于UIImagePickerController的所有相机控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用UIImagePickerController时,我无法显示相机控件.具体来说,我需要能够在慢动作,视频,照片,方形和全景之间进行选择.

I have trouble showing the camera controls when using UIImagePickerController. Specifically, I need to be able to select between slo-mo, video, photo, square and pano.

我使用的代码的必要部分是:

The essential part of code I use is:

UIImagePickerController *pc = [[UIImagePickerController alloc] init];
[pc setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
pc.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeImage, nil];

但这显示了一个选择器控制器,它只能拍摄照片,即没有正方形也没有全景模式.

But this shows a picker controller with the ability to take a picture only i.e., no square nor pano modes either.

将pc.mediaTypes设置为:

Setting pc.mediaTypes to:

pc.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeImage, (NSString *)kUTTypeMovie, nil];

..显示带有视频和照片的选择器控制器.但是如何显示其他相机模式/类型?例如. Pano的UTType是什么?

..shows a picker controller with video and photo. But how do I get the other camera modes/types to show? E.g. what is the UTType for pano?

推荐答案

UIImagePickerController不能让您将Apple的整个Camera应用程序用于您自己的应用程序中.并非相机"应用程序的所有功能都可用.您可以通过调用-[UIImagePicker availableMediaTypesForSourceType:]打印可用的媒体类型,您会发现获得了kUTTypeImage和kUTTypeMovie.

UIImagePickerController doesn't give you Apple's whole Camera app to use inside of your own app. Not all of the functionality of the Camera app is available. You can print available media types by calling -[UIImagePicker availableMediaTypesForSourceType:] and you'll find that you get kUTTypeImage and kUTTypeMovie.

UIImagePickerController不提供方形,慢动作,延时和全景功能.

Square, slo-mo, time-lapse, and panorama functionalities are not provided by UIImagePickerController.

这篇关于如何显示带有/用于UIImagePickerController的所有相机控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 19:49