IOS use volume buttons as input

I recently downloaded an application that uses the "Volume -" button to switch values, and uses the "Volume +" button to start / stop video recording. The application is called SloPro and can be found in the application store. I thought it was not allowed to change the behavior of the iPhone hardware. Any ideas on how this is done?

+3
source share
1 answer

For more information, see Links to audio recording sessions , but basically you start an audio session with AudioSessionInitialize. Then you activate it with AudioSessionSetActive. Then listen to the changes in the volume using AudioSessionAddPropertyListenerwhere you can pass the type callback AudioSessionPropertyListener.

: http://fredandrandall.com/blog/2011/11/18/taking-control-of-the-volume-buttons-on-ios-like-camera/

+5

All Articles