I want move the ContentOffset of my UISCrollView. I'm using different methods, CABasicAnimation or UIView animateWithDuration but the problem is that, during the animation, my UIScrollView is clipped from the right and left sides.
When animation is finished, the size of the UIScrollView seems right.
- (void)animateScrollToTheBottom {
self.scroll.scrollEnabled = NO;
CGFloat scrollHeight = self.scroll.contentSize.width;
[UIView animateWithDuration:10
delay:0
options:UIViewAnimationCurveEaseInOut | UIViewAnimationOptionBeginFromCurrentState
animations:^{
self.scroll.contentOffset = CGPointMake(0, scrollHeight);
} completion:^(BOOL finished) {
self.scroll.scrollEnabled = YES;
}];
}
Any suggestions? Thanks!