iphoneuiscrollview

How to start with particular Image using the iPhone WWDC 2010 - 104 PhotoScroller


I am going through the Sample code of iPhone WWDC 2010 - 104 PhotoScroller App.

It's working great with my project related images (PDF Page Images)

Now I want to start the app from a custom image no - Say 5. And it should show 6th image on next swipe and 4th on previous swipe.

Can anyone help in this Regard ?


Solution

  • I think you should try modifying the contentOffset of the UIScrollView.

    Depending on the width frame you should set it to something like :

    imagePos * scrollView.frame.width
    

    where imagePos begin to 0 and end to (nbrImage - 1)

    Good Luck ;-)