hi, i'm using the code of this link: http://blog.stormyprods.com/2008/09/proper-usage-of-mpvolumeview-class.html it is working on an ipod touch, but NOT on iphones. what can be the reason for that?
A:
Two things:
- I think iPhone OS 3.0 does a better job of syncing the MPVolumeView slider with changes to the system volume received from the buttons on side. So the workaround on that blog (listening for NSNotifications) may no longer be necessary.
- On the iPhone, volume changes are contextual. If your app is currently playing sound, then hitting the volume buttons (or, presumably, MPVolumeView) affects the volume level of your app's audio. But if your app isn't producing sound, then you are just changing the ringer volume. This might explain why your current code works on touches, which don't have ringers.
invalidname
2009-09-29 17:58:51