Several people have asked for clarification on using the MPVolumeView, so I've put together a full XCode demo project to show off its usage and features.
Note: In order for the slider to respond to the volume buttons, you need to be playing audio. Otherwise you won't see anything happen.
Here's a link to the project: MPVolumeView Demo.
I included some extra features in the code I hadn't mentioned previously, such as how to change the color of portions of the slider, add icons for "soft" and "loud" ends of the slider, etc.
Subscribe to:
Post Comments (Atom)
7 comments:
This seems to be missing. Can you repost or can someone point me to the project somewhere else? I'm having issues with trying to get the slider's Maximum and Minimum Track Images to display if the system volume isn't 0.
I updated the link. It should be correct now.
much thanx for the project.
it help me a lot!
compilation with 2.2.1 perfect.
no success with 3.0
what could be the reason?
p.s.: the app starts in simulator, but no slider showing up
In the 3.0 simulator, the slider will not show up, but it does still show up on a real 3.0 device.
big trouble! i uploaded my app to the app store, tested on an ipod touch where the slider is working. NOT so on iphones. wwhat could be the reason for that?
When i run MPVolumeView Demo project i get 1347 error such as /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:66:0
Post a Comment