guys.i'm new to iphone.i run the zoomingpdfview demo,everthing is fine,except t开发者_StackOverflow中文版hat i don't want the pdf is zooming out smaller than the screen's size,or even very small.. i've tried many ways,but still can't. so,how can i achieve that goal?thanks in advance.,any advice will be gratefull.
There's a property on a UIScrollView called minimumZoomScale. However, this isn't measured in pixels, it's measured as a factor of the size of the view.
You will need to calculate the min zoom yourself i.e.
// 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];
However, you might have to calculate this for each visible page - pdfs can have pages of different size :)
精彩评论