This is a sample project demostrating how to make an iOS app able to listen for changes to the volume levels (pushing the volume buttons on the device) and trigger a function, like on iOS5+ camera. This is inspired from the excellent work by Fred Randall ( http://fredandrandall.com/blog/2011/11/18/taking-control-of-the-volume-buttons-on-ios-like-camera/ - https://github.com/blladnar/RBVolumeButtons ). The main difference is that this approach doesn't interrupt music that is playing on the device, when you start the listener.
raneri/VolumeListener
Catches press on volume buttons on iOS, without impacting on playing music and without private APIs.
Objective-C