Problem is sorted now. Basically, I created extra pages before and after my pages so it looks like this:
8 1 2 3 4 5 6 7 8 1
Then in the scrollViewDidEndDecelerating I do a simple if statement that checks if I am at either the first or last page and locate the scrollView appropriately.
- (void)scrollViewDidEndDecelerating:(UIScrollView *)newScrollView
{
[self scrollViewDidEndScrollingAnimation:newScrollView];
pageControl.currentPage = currentPage.pageIndex;
if(currentPage.pageIndex==0){
scrollView.contentOffset = CGPointMake(320*(pageControl.numberOfPages-2), 0);
pageControl.currentPage = pageControl.numberOfPages-2;
}else if(currentPage.pageIndex==pageControl.numberOfPages-1){
scrollView.contentOffset = CGPointMake(320, 0);
pageControl.currentPage = 1;
}
}