title: How to autoscroll image by image?
body: <p>I have about 9 images on the scrollView, i want to make it autoscrolling image by image(like first image scroll to second and ..till the last one). I did something like this:</p>
  
  <pre><code>timer = [NSTimer scheduledTimerWithTimeInterval:.0 target:self selector:@selector(scrolling) userInfo:nil repeats:NO];
  
  - (void)scrolling{
  
  CGFloat currentOffset = scrollView.contentOffset.x;
  
  if(currentOffset &lt; 2236){
  
  CGFloat newOffset = currentOffset + 172;
  
  
  [UIScrollView beginAnimations:nil context:NULL];
  [UIScrollView setAnimationDuration:2.1];
  [scrollView setContentOffset:CGPointMake(newOffset,0.0) animated:YES];
  [UIScrollView commitAnimations];
  
  }
  </code></pre>
  
  <p>but it just scroll only one time (from first image to the second). what did i do wrong? Any idea?</p>