setContentOffset is not accurate

ScrollView set contentOffset
such setting is sometimes inaccurate, there is a little offset

 [self.scrollView setContentOffset:CGPointMake(width, 0)];

This setting will be accurate, but sometimes we don’t need animation

 [scrollView setContentOffset:CGPointMake(width, 0) animated:YES];

Therefore, this setting is accurate and without animation, perfect!

[self.scrollView setContentOffset:CGPointMake(width, 0) animated:NO];

Guess you like

Origin blog.csdn.net/qq_28285625/article/details/104918958