Well, these are just a couple of answers from the head, but you can try using this method (in UIScrollView
, of which UITableView
is a subclass):
-(void)setContentOffset:(CGPoint)contentOffset animated:(BOOL)animated
Once -(CGRect) rectForRowAtIndexPath:
gives you the coordinates of the cell, you can animate the location of the cell. But instead of calling it once, name it a couple of times with a smaller offset, then with larger and larger offsets, and then with smaller ones. I am worried that it will be difficult to make it smooth.
However, if this does not work, the contentOffset
value inside the UIView animateWithDuration:delay:options:animations:completion
block UIView animateWithDuration:delay:options:animations:completion
. Perhaps if you use UIViewAnimationOptionCurveEaseInOut, you may get an effect that you want to just call it once. If not, start several animations in each part of the path and cover large and large distances before slowing down.
source share