(from the PageControl example)
To go directly to a specific scrollView section, use
CGRect frame = scrollView.frame; frame.origin.x = frame.size.width * page; frame.origin.y = 0; [scrollView scrollRectToVisible:frame animated:YES];
I just implemented the same thing, for example scrollview and page control, and used
pageControl.currentPage = {pageNumber};
which worked fine, you are sure that the pageControl output window is correctly configured in Interface Builder (if you use it).
If the problem is that scrollView is not working, not on the Control page. Then make sure the scroll content is set correctly.
scrollView.contentSize = CGSizeMake(320*numberOfPages, scrollView.frame.size.height);
For this scroll, you add content to each section
page1ViewController.view.frame = CGRectMake(0, 0, 320, 200); [scrollView addSubview:page1ViewController.view];
The next page is pressed at 1 screen width
page2ViewController.view.frame = CGRectMake(320, 0, 320, 200); [scrollView addSubview:page2ViewController.view];
Liam
source share