Detect when volume button is pressed

倾然丶 夕夏残阳落幕 提交于 2020-01-17 01:19:15

问题


I've done lots of research and I know that Apple will not allow this but does anyone have code or can someone point me to code that enables me to detect when a user presses either the up or down volume button on the iphone?

I need to be able to detect which one is pressed (up or down). I will not be submitting anything to apple that has this code. I am just wondering if possible?

Thanks in advance.


回答1:


you can do it-- look at these --

program access to iPhone volume buttons

iPhone SDK 4 - How to programmatically detect volume hardware button press?

How to get audio volume level, and volume changed notifications on iOS?



来源:https://stackoverflow.com/questions/6259553/detect-when-volume-button-is-pressed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!