获取指定的section并滚动到顶部
2017-12-09 本文已影响29人
c5550ea746f8
获取位于tableview顶部的section,取所有可见的Cell第一个则为最顶部的,然后根据cell获取indexPath,
NSUIntegersectionNumber =
[tableViewindexPathForCell:_rightTableView.visibleCells.firstObject].section;
tableview滚动到指定的行:
[tableViewscrollToRowAtIndexPath:[NSIndexPathindexPathForRow:0inSection:indexPath.row]atScrollPosition:UITableViewScrollPositionTopanimated:YES];