iPhone UITableViewCell如何滚动到视图顶端。

如何让UITableViewCell滚动到视图顶端。

- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;
- (void)scrollToNearestSelectedRowAtScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated;
这两个方法都可以用,第一个函数是吧当前行滚动到指定位置,(UITableViewScrollPosition)scrollPosition-这个有四个选择:top,mid,bot,,,,,第二个函数是滚动到最近的位置
原文地址:https://www.cnblogs.com/duyuiOS/p/5106349.html