indexPathForRow:0 inSection:indexPath.section]; [_leftTableView reloadData]; [_leftTableView scrollToRowAtIndexPath...indexPathForRow:0 inSection:indexPath.section]; [_leftTableView reloadData]; [_leftTableView scrollToRowAtIndexPath
curIndexPath = [NSIndexPath indexPathForRow:weakself.playIndex inSection:0]; [weakself.myTableView scrollToRowAtIndexPath
当然了 tableview 里边就有相应的方法: [_tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle...indexPathForRow:textField.tag inSection:0]; //将要编辑的textfield 所在的cell 使其滚动到中间的位置 [_tableView scrollToRowAtIndexPath
index = [NSIndexPath indexPathForRow:arrCount - 1 inSection:0]; if (arrCount > 0) { [self.tableView scrollToRowAtIndexPath
如果需要去除该滚动效果,可以在reloadData之后,调用scrollToRowAtIndexPath并设置animated:NO,最后再用setContentOffset:微调位置。...UITableView还有类似的问题,如果列表项过多时,scrollToRowAtIndexPath有时并不准确,比如有1000行时滚动到第500行,此时可能会出现滚到501或者499行的情况。...从这里去分析,如果需要滚动到准确的位置,可以用estimatedRowHeight的属性,设置和行高一样的高度;在行高各不相同的场景,可以设置estimatedRowHeight为大致的数字,在scrollToRowAtIndexPath
indexPathForRow:self.dataArray.count-1 inSection:0]] withRowAnimation:UITableViewRowAnimationLeft]; [self.Tb scrollToRowAtIndexPath
lrc.time < currentTime) { self.currentRow = i; [self.tableView scrollToRowAtIndexPath
根据分区获取尾视图 - (UITableViewHeaderFooterView *)footerViewForSection:(NSInteger)section; 使表示图定位到某一位置(行) - (void)scrollToRowAtIndexPath
[NSIndexPath indexPathForRow:self.dataSource.count-1 inSection:0]; 20 21 [self.myTableView scrollToRowAtIndexPath
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0]; [self.tableView scrollToRowAtIndexPath
领取专属 10元无门槛券
手把手带您无忧上云