允许UIImagePickerController编辑视频,但不能编辑图像 [英] Allow UIImagePickerController to edit video but not images

查看:102
本文介绍了允许UIImagePickerController编辑视频,但不能编辑图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Whatsapp 中上传图像或视频,似乎使用了UIImagePicker.

Uploading an image or video in Whatsapp, seems to use a UIImagePicker.

可以在该视图中编辑视频,但不能编辑图像.似乎在SDK中,allowsEditing属性确定是否允许对图像和视频进行编辑.

It's possible to edit video in that view, but images can't be edited. It seems that in the SDK, the allowsEditing property determines whether editing is allowed for both images and video.

如何获得类似Whatsapp的行为,可以在其中编辑视频而不能在图像中进行编辑?

How can I get the behavior like Whatsapp, where video can be edited but images cannot?

推荐答案

要禁止图像编辑,请设置allowsEditing = false.

To disallow image editing set allowsEditing = false.

要允许视频编辑,请在UIVideoEditorController中显示所选择的视频.

To allow video editing, present the picked video in a UIVideoEditorController.

或者使用您可以根据自己的喜好配置的自定义图像/视频选择器.

Or use a custom image / video picker that you can configure to your liking.

这篇关于允许UIImagePickerController编辑视频,但不能编辑图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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