views:

323

answers:

0

Hi all, I'm wondering if anyone knows how to prevent the contents of a uiscrollview from moving unsteadily when scrolling manually by setting the content offset. When scrolling by touch the text remains clear and steady. I would like to recreate this by animating with the animated option set to false. I'm using a timer to scroll at a given interval. The text is being drawn to a view in the contents, but it vibrates and it becomes more difficult to read clearly when animating at a greater speed. The speed varies and the scrolling must respond to changes in speed quickly.

Here's some code -

- (void) scrollIncrAmt:(float) amt { 
  _currentSpeedIncr = amt;
  NSArray* arr = [SharedTickerInfo sharedTickerInfo].sDataArray;
  DataObj* tdObj = [arr objectAtIndex:_row];
  if ( ![tdObj isDirLeft] ) {
   amt = -amt;
  }
  float scrollTo = self.scrollView.contentOffset.x + amt;
  [scrollView setContentOffset:CGPointMake(scrollTo, 0.0f) animated:NO];  
}