I received a bug ticket from my client about the unusual behavior of my application UI. It was a problem which was occurring only in iOS7 only.
When the keyboard pops up in iPad devices running on iOS7 the web view of our app gets shrink (app development using Phonegap).
Solution that works for me : This problem can be solved in few steps.
We need to go to Config.xml and inside the preference tag just need to set the value of KeyboardShrinksView to false.
I have faced this as a very common requirement, where we need to display any html content to any specific portion of our app and we need to make a bridge which can talk with platform APIs.
So here again webview content can also make communication with Titanium native API’s. Here I have demonstrated a way to call native API functionality from webview contents.
With above video, I have described the way to bind Titanium API’s with HTML events, which can talk to each other.
Sometime we need to know the page title of the currently loaded page in webview.
Using Titanium evalJS() method we can get the specific DOM element of the page loaded in webview. Using the same we can get the page title too.
Above screen cast demonstrates the way to get page title i.e. currently loaded on the webview using Alloy in Titanium
Webview is generally used to view external website or its content at any instance of our application. Addition to this functionality we can also load html file content resides to our app directory on webview.
Here we have seen the way to load any html file content to any webview using its ‘url’ property provided by Titanium.
Using webview API in Titanium we can load external web link, we can load html file contain addition to that locally we can prepare variable holding html data and using one of the property of webview called ‘html’ we able load html string to it.
So on runtime we are able to load any html string content to any webview by assigning the same to its very own property ‘html’.