Question

I've been reading about how to support the zooming for a webview, and i've found a lot of resources. And now i'm really lost.

What i've read:

  • all you need is to enable the 'scales page to fit'
  • add the uiwebview inside a uiscrollview (while setting the
    minimum/maximum zoom scale and
    implementing - (UIView
    *)viewForZoomingInScrollView:(UIScrollView *)scrollView)
  • then you might need to handle the touchdown events... manually then you might have to
    recognize them... manually... or
    using a gesture recognizer.

And apple documentation doesn't really help, and i can't really tell which ios are they talking about? I'm really lost now.

So if some veteran in coco-touch (which is very rare to find) can guide us.

  • Do i need a uiscrollview?
  • What do i really need to implement?
  • When would i need to capture touches events, recognize the gestures, and the zooming work.

And which is required in approximately which ios. Maybe this topic will help me and other people like me.

Thanks a lot in advance

Was it helpful?

Solution

Just enabling scalesPageToFit should do it; however, it's only possible to zoom to 100%, which also means that you can't zoom a page which is less than or equal to the screen size to begin with.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top