Possible Duplicate:
program access to iPhone volume buttons
Is it possible to detect a volume up button press/release in an iOS app?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at http://fredandrandall.com/blog/2011/11/18/taking-control-of-the-volume-buttons-on-ios-like-camera/
Essentially you have to initialize an audio session, make it active, and then listen for changes. Finally you initiate a callback.
However, be careful with your implementations of hardware commands. Unintentional misuse can get you banned from the app store.