Change text of UIAlertView when recording a video

2019-01-29 09:28发布

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".

Thank you, aimak

1条回答
叛逆
2楼-- · 2019-01-29 09:56

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.

查看更多
登录 后发表回答