I've been working on a paging scrollview with several images and a tableview as a table of content.
Using the table I can jump to specific pages. I've got everything working except the jump to page method which when I touch the screen brings the scroll view to the first page UNLESS I scroll to the next page. It's been driving me nuts for the last couple of days :s 

here's my code :

```
-(void)skipToPage {     
    NSInteger temp = [selectedPage integerValue];   
    [pagingScrollView setContentOffset:
    [self offsetForPageAtIndex:temp] animated:NO];  
    pagingScrollView.contentSize = [self contentSizeForPagingScrollView]; 
}

- (CGPoint)offsetForPageAtIndex:(NSUInteger)index {                                                                                                        
    CGRect pagingScrollViewFrame = [self frameForPagingScrollView];                                                                                        
    CGPoint offset;                                                                                                                                        
    offset.x = (pagingScrollViewFrame.size.width * index);                                                                                                 
    offset.y = 0;                                                                                                                                          
    return offset;                                                                                                                                         
}  

```

Thanks in advance fellas! 

EDIT: scrolviewDidScroll calls the Tile page method which prepares each image to be displayed

```
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    [self tilePages];   
}

```

It's a method from the photoScroller sample from Apple

```
- (void)tilePages 
{
    // Calculate which pages are visible
    CGRect visibleBounds = pagingScrollView.bounds;
    int firstNeededPageIndex = floorf(CGRectGetMinX(visibleBounds) / CGRectGetWidth(visibleBounds));
    int lastNeededPageIndex  = floorf((CGRectGetMaxX(visibleBounds)-1) / CGRectGetWidth(visibleBounds));
    firstNeededPageIndex = MAX(firstNeededPageIndex, 0);
    lastNeededPageIndex  = MIN(lastNeededPageIndex, [self imageCount] - 1);

    // Recycle no-longer-visible pages 
    for (ImageScrollView *page in visiblePages) {
        if (page.index < firstNeededPageIndex || page.index > lastNeededPageIndex) {
            [recycledPages addObject:page];
            [page removeFromSuperview];
        }
    }
    [visiblePages minusSet:recycledPages];

    // add missing pages
    for (int index = firstNeededPageIndex; index <= lastNeededPageIndex; index++) {
        if (![self isDisplayingPageForIndex:index]) {
            ImageScrollView *page = [self dequeueRecycledPage];
            if (page == nil) {
                page = [[[ImageScrollView alloc] init] autorelease];
            }
            [self configurePage:page forIndex:index];
            [pagingScrollView addSubview:page];
            [visiblePages addObject:page];
        }
    }

}

```