Page control directly switching
<p>I have scroll view which contains 5 views and it include page control when i clicked over fourth bubble of page control it moves to second view but i want it should directly move to fourth view please help me to solve this problem.</p>

<p>calling of pageControl is as follows:</p>

<pre><code>[pageControl addTarget:self action:@selector(pageTurn:)       forControlEvents:UIControlEventValueChanged];
</code></pre>

<p>implementation of pageTurn method is as follows:</p>

<pre><code>- (void) pageTurn: (UIPageControl *) aPageControl
{
    int whichPage = aPageControl.currentPage;

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    scrollView.contentOffset = CGPointMake(320 * whichPage, 0);
    [UIView commitAnimations];
 }
</code></pre>

<p>and my scrollViewDidScroll is as follows:</p>

<pre><code>- (void) scrollViewDidScroll: (UIScrollView *) aScrollView
{
    CGPoint offset = aScrollView.contentOffset;
    pageControl.currentPage = offset.x /320 ;

 }
</code></pre>
