Tag: ios animations

停止自动滚动UITableView

我有一个UITableView,我用setContentOffset自动滚动。 像这样: CGFloat point = self.table.tblMinutes.contentSize.height – self.table.tblMinutes.bounds.size.height; [self.table.tblMinutes setContentOffset:CGPointMake(0, point) animated:false]; [self.table.tblMinutes layoutIfNeeded]; [UIView animateWithDuration:20.0 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ [self.table.tblMinutes setContentOffset:CGPointMake(0, point – 500) animated:false]; } completion:nil]; 我想要达到的是滚动平稳减速停止。 我一直无法做到这一点。 调用[self.table.tblMinutes.layer removeAllAnimations]停止animation,但由于某种原因移动contentOffset,达不到我想要的。 我尝试在animation中使用UIViewAnimationOptionBeginFromCurrentState选项,但是什么都没做。 有什么build议么?