Open fraxool opened 8 years ago
@lapat @jlalvarez18 @germ4n has anyone figured this out yet?
This simple library works well: https://github.com/blladnar/RBVolumeButtons
Also see this blog post on how to use the above library: http://fredandrandall.com/blog/2011/11/18/taking-control-of-the-volume-buttons-on-ios-like-camera/
Just one note though, Apple should approve apps using the volume buttons IF it's used only with video/photo capturing. I believe if you use it anywhere else for another function they will reject it...
This is very interesting
I've used the RBVolumeButtons library before. It works, but the only side effect of using it, is sometimes you will see the volume HUD appear. It's not a big deal, but there doesn't seem to be any way around it.
As far as the code I've seen so far this is the closest: https://github.com/jpsim/JPSVolumeButtonHandler/blob/master/JPSVolumeButtonHandler/JPSVolumeButtonHandler.m Nothing I've seen will let you know when the button itself is down or up only when the volume changes.
Hello!
I was thinking about a good new feature for this awesome library : the ability to record segments with the volume buttons, just like in the Snapchat app for example.
I have tried to implement this feature by myself, by "observing" the volume buttons with this code (Swift) :
But I am not able to detect when the volume buttons are released. Do you know how I could do that so we can use volume buttons to record ?
Thanks! Axe