使用UIImagePickerController录制视频并达到videoMaximumDuration时,更改UIAlertView的文本 [英] Change text of UIAlertView when recording a video with UIImagePickerController and reaching the videoMaximumDuration

查看:793
本文介绍了使用UIImagePickerController录制视频并达到videoMaximumDuration时,更改UIAlertView的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道当我用 UIImagePickerController UIAlertView 的文字c>然后我到达videoMaximumDuration。
如果无法更改 UIAlertView 的文本,是否至少可以用其他语言显示它?

I'd want to know how to change to text of the UIAlertView appearing when I record a video with a UIImagePickerController and I reach the videoMaximumDuration. If it is not possible to change the text of that UIAlertView, is it at least possible to display it in another language ?

编辑:默认文本为已达到此视频的最大长度,标题为视频录制已停止。

Edit : the default text is "The maximum length for this video has been reached" with title "Video Recording Stopped".

谢谢,
aimak

Thank you, aimak

推荐答案

警报文本已本地化为设备的当前区域设置,除非您需要走视图层次结构寻找UIAlertView并设置其消息属性(这是脆弱的,需要在你正在部署的所有iOS版本上进行测试),你可能需要在捕获会话之上创建完全自定义的UI。拾取器控制器委托协议没有记录停止和启动时的回调,因此没有一种好的方法可以手动控制它并提供自己的警报而不会在AVFoundation中降低更低级别。

The text of the alert is localized to the current locale settings of the device, and unless you want to walk the view hierarchy looking for the UIAlertView and set its message property (which is fragile and would need to be tested across all versions of iOS you're deploying to), you'll probably need to create a fully custom UI on top of a capture session. The picker controller delegate protocol doesn't have callbacks for when recording stops and starts, so there isn't a good way to control it manually and supply your own alert without going much lower-level in AVFoundation.

这篇关于使用UIImagePickerController录制视频并达到videoMaximumDuration时,更改UIAlertView的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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