在iOS 5上淡出MPMusicPlayerController上的播放音量 [英] Fade out Playback Volume on MPMusicPlayerController on iOS 5

查看:161
本文介绍了在iOS 5上淡出MPMusicPlayerController上的播放音量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用



它只是指示您在视图中添加MPVolumeView。出于某种原因,在视图层次结构中使用它会阻止卷HUD出现。适合我,也希望对你有用。


I was using this answer for how to fade out music player volume in my app, but in iOS 5, this leads to the on-screen HUD for volume appearing to the user, as if they had pressed the volume buttons on the side of their device. Does anyone know a workaround that doesn't display the HUD?

解决方案

I found a solution here: applicationMusicPlayer volume notification

It simply directs you to add an MPVolumeView to your view. For some reason, having that in the view hierarchy prevents the volume HUD from appearing. Works for me, hopefully for you too.

这篇关于在iOS 5上淡出MPMusicPlayerController上的播放音量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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