Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fade out Playback Volume on MPMusicPlayerController on iOS 5

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?

enter image description here

like image 608
Ash Furrow Avatar asked Oct 10 '22 18:10

Ash Furrow


1 Answers

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.

like image 179
kurtzmarc Avatar answered Oct 13 '22 10:10

kurtzmarc