开发者

pinch zooming for a UIWebView for ios 3.0 and newer

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.

Tha开发者_如何转开发nks a lot in advance


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜