开发者

UiimagePIckerController Interface with both camera and video

开发者 https://www.devze.com 2023-01-08 14:29 出处:网络
How can we display the UiImagepicker controller interface with both ca开发者_StackOverflow社区mera and video mode, as it is in the default camera application on iPhone.UIImagePickerController has a me

How can we display the UiImagepicker controller interface with both ca开发者_StackOverflow社区mera and video mode, as it is in the default camera application on iPhone.


UIImagePickerController has a mediaTypes property, which is an array of types you want to support (image, video, or both):

http://developer.apple.com/library/ios/documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html#//apple_ref/occ/instp/UIImagePickerController/mediaTypes


The way it has it within the OS is that it changes the picker via a slider in the bottom toolbar.

When the value changes from photo to video via the slider, you could recreate the UIImagePickerController with the appropriate mediaType and reload the view.

I do not know if this would be as seemless as the iPhone included way of doing things without testing it, however, this would allow you to change the picker being used from one to the other.

0

精彩评论

暂无评论...
验证码 换一张
取 消