当我单击"iphone"按钮“最小化"时,如何在后台模式下播放音频?该应用程序? [英] how to playing audio in background mode when If i click on iphone button to "minimize" the app?

查看:150
本文介绍了当我单击"iphone"按钮“最小化"时,如何在后台模式下播放音频?该应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发新的iPhone音频应用程序.

I'm work on new iphone audio application.

当我打开应用程序时,音频已加载并启动.如果我单击"iPhone"按钮以最小化"该应用程序,则声音将停止.我需要声音仍在后台模式下播放.

When i open the app, the Audio was loaded and started. If i click on iphone button to "minimize" the app, the sound was stopped. I need the sound still playing in background mode.

我该怎么做?

谢谢

推荐答案

要在后台播放,请在.plist文件中添加一个名为"UIBackgroundModes"的Array项,然后将"audio"添加为数组成员.

To play in the background, add an Array entry named "UIBackgroundModes" your .plist file, and add "audio" as array member.

.plist条目:

UIBackgroundModes Array
Item0 String audio

这篇关于当我单击"iphone"按钮“最小化"时,如何在后台模式下播放音频?该应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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