iphone uiimagepickerViewController选择photolibrary视频 [英] iphone uiimagepickerViewController choosing photolibrary video

查看:79
本文介绍了iphone uiimagepickerViewController选择photolibrary视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正在开发一个只选择视频形式的本地照片库并将其发送到服务器的应用程序。这里修复videoMaximumDuration为1min ..(bcoz am限制用户选择视频不到1分钟。)

Am developing a application which is only selecting video form local photo library and sending it to the server. Here am fixed videoMaximumDuration as 1min..(bcoz am restricting user to choose video less than 1min).

当用户在uiimagepickerviewcontroller中选择超过1分钟的视频时,出现一个文本
'视频发送时间太长 - 请选择类似的表单视频'
此处出现此文本时,我想禁用或隐藏uiimagepickercontroller底部的选择按钮。

when user choosing more than 1min video in uiimagepickerviewcontroller a text is appearing that 'Video Too Long to Send - Please select similar form video' Here while this text is appearing i want to disable or hide the 'Choose' button which is there in bottom of uiimagepickercontroller.

如何在imagepickercontroller中隐藏选择按钮或禁用。

HOW to hide that choose button or disable in imagepickercontroller.

谢谢

推荐答案

你不能这样做。无法以这种方式自定义选择器。

You can not do this. It is not possible to customize the picker in this way.

您可以做的最好的事情是在视频必须小于1分钟之前警告用户。听起来你已经在做了。然后在委托回调中

The best thing you can do is to warn the user before that the video must be less than 1 min. Which it sounds like you are already doing. Then in the delegate callback

imagePickerController:didFinishPickingMediaWithInfo:

检查视频不到1分钟。如果没有显示错误并让用户再次选择。

Check the video is less than 1 min. If not display an error and make the user pick again.

或许你可以建议编辑视频(这在iPhone上很容易)。

Or perhaps you can suggesting editing the video (which is very easy to do on iPhone).

这篇关于iphone uiimagepickerViewController选择photolibrary视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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