当app重新启动活动状态时,MPMoviePlayerViewController被解雇 [英] MPMoviePlayerViewController gets dismissed, when app resignes active state
问题描述
当我将iPhone设置为睡眠状态时,切换到另一个应用程序等,然后再次返回,之前可见 MPMoviePlayerViewController
(以 presentMoviePlayerViewControllerAnimated:
)不再存在了。当我的应用程序失去焦点时,我该如何维护呢?
When I set my iPhone to sleep, switch to another app, etc., and then come back again, a prior visible MPMoviePlayerViewController
(presented with presentMoviePlayerViewControllerAnimated:
) is not there anymore. How can I maintain it, when my app loses the focus?
推荐答案
我发现,音频背景模式有在Info.plist文件中指定以实现所需的行为。但有趣的是我的应用程序在我添加之后被拒绝,因为当应用程序不执行实际的背景音频时,它是不允许的。我认为这被称为两难。 ;)
I found, that the "audio" background-mode has to be specified in the Info.plist-file to achieve the desired behavior. But interestingly my app got rejected after I added this, because it is not allowed when the app doesn't do actual background audio stuff. I think this is called a "dilemma". ;)
这篇关于当app重新启动活动状态时,MPMoviePlayerViewController被解雇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!