You cannot do this using the built-in keyboard change button. There is no public API to access this button.
If you really just show the web form in a UIWebView , I really think that in fact you cannot use the public APIs at all.
If you create a form using views, you can get closer to some work. What you can do is use the inputAccessoryView text fields on the toolbar, which has a button to switch to / from the barcode reader. When the user turns on the barcode reader, set the inputView text box to view the barcode reader. When the user turns off the barcode reader, set the inputView back to nil .
You may be able to do this job for text fields in UIWebView by digging into the hierarchy of a private view of a web view and something else, but you will definitely rely on implementation details that may change in each version.
source share