I have a UIWebView
which inside a UIScrollView
(scrollview contain another component)
I tried to enable multitouch both on Interface Builder or Programmatic on UIWebView
but it still cannot zoom for html, do I need to handle both zoom in at the UIScrollView
and UIWebView
? Or anything I haven't to set?
You MUST set scalesPageToFit=YES for any pinching and zooming to work on a UIWebView
OK, you need to do both the above, but also the following. I had a web view in the main view, and that didn't work.
<UIScrollViewDelegate>
in your view controller, drag the scroll view delegate to the view controller in Interface Builder, and implement the viewForZoomingInScrollView
method. This must return the pointer to the UIScrollView (return myScrollView).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With