SCROLLVIEW最小缩放大小
问题描述:
guys.i'm新的iPhone.i运行zoomingpdfview演示,everthing是好的,除了我不希望PDF缩小比屏幕的大小,甚至很小.. 我已经尝试了很多方法,但仍然不能。那么,我该如何实现这一目标呢?在此先感谢,任何建议都会令人满意。SCROLLVIEW最小缩放大小
答
UIScrollView上有一个名为minimumZoomScale的属性。但是,这不是以像素为单位进行衡量,而是以视图大小的一个因子来衡量。
你需要计算最小放大自己即
// for a pdf width 230 and screen width 360 your min zoom would be 2.0
// a pdf width 720 and screen width 360 your min zoom would be 0.5
// So, to set the zoom for a scroll view
[myScrollView minimumZoomScale:screenWidth/pdfWidth];
但是,您可能要计算此为每个可见页 - PDF可以有不同的尺寸:)
thanks.deanWombourne页 – zhouxiang 2011-01-13 06:24:43