Is it possible to use iPhone's volume control buttons for some other purpose?
I need to make a photo app.
Will i开发者_运维知识库t be possible to assign some function, like controlling the light intensity or brightness to an iPhone's hardware volume control buttons?
Changing the behavior of iPhone external hardware buttons is a violation of the iPhone Developer Program License Agreement.
There is an app that was banned from the appstore for trying this.
Ironically, iOS5
Camera App allows to use the volume control as a shutter. Perhaps the SDK will eventually allow more.
This is possible. This tutorial will walk you through the steps.
http://fredandrandall.com/blog/2011/11/18/taking-control-of-the-volume-buttons-on-ios-like-camera/
In general, the App Store Review Guidelines state that re-purposing physical buttons is not allowed. However, since the volume up button is now a standard feature for taking photos, there appears to be some leniency for camera apps that also adopt this feature. The official guidelines state this rule in section 2.5.9:
https://developer.apple.com/app-store/review/guidelines/#software-requirements
2.5.9 Apps that alter or disable the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, or other native user interface elements or behaviors will be rejected. For example, apps should not block links out to other apps or other features that users would expect to work a certain way. Learn more about proper handling of links.
Short Answer:No.
A few photography applications have tried to do this and Apple has rejected them all. Maybe one day...
Yes, but only on a jail-broken phone.
I don't think this is really possible as we cannot change the in-built functionalities of the volume control of iPhone and for that matter any of the iOS devices and make it work as we want.
I think all this is not a part of Public API for iOS developers which we can modify and use it for other functions in our application. It is a part of Private API.
So as far as I know, it is not possible.
Hope this helps you.
精彩评论