I have UIScrollView
. I set contentOffset using the code :
[UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionCurveEaseOut animations:^{
[comicsScrollView setContentOffset:CGPointMake(comicsScrollView.contentOffset.x, currentView.frame.origin.y + currentView.bounds.size.height/2 - comicsScrollView.bounds.size.height/2) animated:NO];
} completion:^(BOOL finished) {
}];
Into
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
method and the same code into
- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
When I make vertical scroll - scroll's indicator has an incorrect behavior, It jumps or remains in previous position.
Where is my mistake?