开发者

Change the scale factor in UIScrollView

Is it possible to change the scaling factor of a UIScrollView? What I mean is I can only use two pinch gesture to completely zoom-out the content view to its minimum scale or two expand gesture to completely zoom-in the content view to its maximum value. Like for example, the minimum scale of the UIS开发者_如何学编程crollView is 0.32 and just by two pinch gesture the content view will scaled to 0.32.

Thanks.


There's no property directly for that, but I bet you could make it work by implementing the UIScrollViewDelegate protocol and overriding the viewForZoomingInScrollView: method, then from that method manually alter the UIScrollView's zoomScale property.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜