【发布时间】:2012-12-28 10:45:42
【问题描述】:
我有UIScrollView。我使用代码设置 contentOffset :
[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) {
}];
进入
- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
方法和代码相同
- (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
当我进行垂直滚动时 - 滚动指示器的行为不正确,它会跳跃或保持在先前的位置。
我的错误在哪里?
【问题讨论】:
标签: iphone uiscrollview scroll uiscrollviewdelegate