I am developing a custom browser for iOS something like Mogok. I need to change the default keyboard when user taps any text input on UIWebView.
I tried this and this with no luck. I have a workaround for buttons but this does not work for textinput and textarea.
My js code is as under for this:
NSString *jsCode = @"function setClickEvent() {for ( i = 0; i < document.all.length; i++) { var obj = document.all[i]; obj.addEventListener('click',function(){window.location = "fake://myApp/something_happened:param1:param2:param3";})}} setClickEvent();";
[self._webView stringByEvaluatingJavaScriptFromString:jsCode];
Is there any other way to achieve this? My only requirement get the notification when user taps on textinput or textarea.