本文介绍了如何以编程方式增加iPhone的音量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用中,我必须在敲击按钮时播放警笛声,当铃声音量设置为某个值时我可以播放,但是我的问题是当用户将其铃声音量保持为零时,我该如何播放
In my app I have to play the siren sound on tapping the button, I can able to play it when ringer volume is set to some value, but my problem is when user kept their ringer volume to zero, how can I play it with maximum sound?
推荐答案
尝试此代码,只能在设备中使用
try this code ,it only work in device
[[MPMusicPlayerController applicationMusicPlayer] setVolume:setvalue];
这篇关于如何以编程方式增加iPhone的音量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!