Hi,
There are 20 images.
When scrolling the UIScrollView, I want to add the image to UIScrollView (one by one). How to do this ?
Please help me to do this.
Hi,
There are 20 images.
When scrolling the UIScrollView, I want to add the image to UIScrollView (one by one). How to do this ?
Please help me to do this.
Hello
1°) You need to use the contentOffset property which will indicate you where on the scrollView you are (try to do some NSLog, you should understand ;-))
2°) Then combine this property with a delegate method of UIScrollViewDelegate to know when a scroll occurred.
3°) Third in the function you calculate the images needed to be printed (with the property in the first step).
And finally you add the images !
Apple have sample code that shows how to do this, called "photoscroller":
This was part of a WWDC 2010 presentation, and the accompanying video is very good at explaining why things are done like they are: