Our application contains UIWebview which displays a HTML page that uses touch events for the display of some images. The problem is with zooming HTML content. When the user touches the screen the html elements process it, and prevent default zooming behavior of the UIWebView. But I need both features. How can I solve the problem? Please help me. Thanks in advance.
Asked
Active
Viewed 493 times
0
-
is your concern only limited to zooming of UIWebView which displays some HTML content ? – Rahul Sharma Apr 26 '12 at 10:44
-
please send your code to me... so that i can help you – Melbourne Jul 04 '12 at 09:57
-
Problem was with in the java script Library-the use event.preventDefault() method. If this method is called, the default action of the event will not be triggered. Thanks for your helpful mind. – Neo Jul 04 '12 at 10:10
1 Answers
2
Hi You need to turn on the Scale Page to Fit property of WebView to YES
You can do this from Interface builder as follows
or you can do the same by
[webView setScalesPageToFit:YES];
Hope it helps.

Rahul Sharma
- 3,013
- 1
- 20
- 47
-
In our javascript, we are dealing with touch events. Before doing it, zooming was perfect. When we began to use both touch and gesture events, all the touch events are passed to javascript and default zooming of scrollview of UIWebView ignored. – Neo Apr 26 '12 at 11:03
-
1If you are well versed with JQuery you can have a look at this http://stackoverflow.com/questions/5186441/javascript-drag-and-drop-for-touch-devices – Rahul Sharma Apr 26 '12 at 11:21