NSArray<NSIndexPath *> * cellArr = [_tableView indexPathsForVisibleRows];
NSIndexPath * currentIndexPath = cellArr[cellArr.count - 1];
_currentCountView.currentCountLabel.text = [NSString stringWithFormat:@"%ld",currentIndexPath.section + 1];
本文介绍了如何在UITableView中获取可见行的索引路径,并利用这些路径更新当前计数视图中的标签文本。
NSArray<NSIndexPath *> * cellArr = [_tableView indexPathsForVisibleRows];
NSIndexPath * currentIndexPath = cellArr[cellArr.count - 1];
_currentCountView.currentCountLabel.text = [NSString stringWithFormat:@"%ld",currentIndexPath.section + 1];
3560
1348

被折叠的 条评论
为什么被折叠?
