iPhone UIWebView - How do you set the zoom level and position?

后端 未结 5 641
温柔的废话
温柔的废话 2021-01-12 01:33

I\'m displaying a series of tiled images in a UIWebView and would like to programmatically set the UIWebview\'s initial zoom and view location.

How does one go abo

5条回答
  •  爱一瞬间的悲伤
    2021-01-12 02:02

    NOTE: this answer is from 2009. Please see one of the better solutions for a more civilized age.


    Programmatic scrolling of UIScrollView is now a solved problem. I have a detailed discussion of how (and why) UIScrollView zooming works, an example project and ZoomScrollView class that encapsulates the required zooming magic at github.com/andreyvit/ScrollingMadness/.

    So probably you should put your images inside UIScrollView like Andy advised.

提交回复
热议问题