andreyvit / ScrollingMadness

A catalog of UIScrollView samples (iPhone)
243 stars 23 forks source link

Drop-in replacement issue? #5

Closed ahlongxp closed 14 years ago

ahlongxp commented 14 years ago

Hi,

ZoomScrollView can't be used as a drop-in replacement of UIScrollView. It is very simple to prove this in ScrollingMadness project.

Steps to reproduce: 1, Import ZoomScrollView.h in TrivialZoomingViewController.m 2, Replace two UIScrollView with ZoomScrollView at around line 16. 3, Build and select "Trival"->"Zooming". The behavior is totally different now.

Please give hint on how to resolve this.

Thanks

andreyvit commented 14 years ago

Hey, thanks for a quality report. Thing is, ZoomScrollView component is officially retired for OS 3.x because it is no longer needed. As it turns out, UIScrollView in 3.x supports nested UIScrollViews properly, at least for paging+scrolling/zooming purpose. ScrollingMadness is still a useful catalog of samples, but I've stopped working on it when I found out that nesting works well. Useful samples are the ones that demonstrate proper paging with rotation support, and proper zooming of graphics.

ahlongxp commented 14 years ago

Thanks for your reply. All I want from ZoomScrollView is double tap to zoom in/out and setZoomScale. Can you give me some hint on how to achieve them with UIScrollView? How will nested UIScrollViews help?

Thanks

andreyvit commented 14 years ago

setZoomScale exists in 3.x UIScrollView. For tap-to-zoom, there is now an Apple example called ScrollViewSuite.

ahlongxp commented 14 years ago

very nice. Thanks a lot!