Is there a way to change the speed of the animation when scrolling a UITableView
using setContentOffset:animated:? I want to scroll it to the top, but slowly. When I try the following, it causes the bottom few cells to disappear before the animation starts (specifically, the ones that won't be visible when the scroll is done):
[UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:3.0]; [self.tableView setContentOffset:CGPointMake(0, 0)]; [UIView commitAnimations];
Any other way around this problem? There is a private method _setContentOffsetAnimationDuration
that works, but I don't want to be rejected from the app store.
[UIView animateWithDuration:2.0 animations:^{ scrollView.contentOffset = CGPointMake(x, y); }];
It works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With