有如下tableView,能滚动:
[self.tableView scrollToRowAtIndexPath:indexPath
atScrollPosition:UITableViewScrollPositionTop
animated:YES];
但是滚动的非常快,我想让速度慢一点。不知道应该怎么实现?
有如下tableView,能滚动:
[self.tableView scrollToRowAtIndexPath:indexPath
atScrollPosition:UITableViewScrollPositionTop
animated:YES];
但是滚动的非常快,我想让速度慢一点。不知道应该怎么实现?
[UIView animateWithDuration:2 animations:^{
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForItem:20 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
}
];
2秒是个例子, 真正时间应该是通过滚动距离来决定的。