Question

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 ?

Was it helpful?

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 ;-)

OTHER TIPS

I made it this way. I have UIScrollView *contentView and in init I calculate frame for photo I want to display and just scroll contentView to that rect. tilePages will do everything else for you

[contentView scrollRectToVisible:[self frameForPageAtIndex:_index] animated:NO];

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top