0

我的应用程序有 4 个部分的 uitableview。在每个部分中,都有一些单元格必须与另一部分中的单元格不同。所以在这个方法中

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

我制作了一个变量 NSInteger row = [indexPath row]; ,以便获得当前行(单元格)的编号。我怎样才能在这里获得包含该行的部分的数量?

4

1 回答 1

1

它很简单:)

NSInteger section = [indexPath section];
于 2012-08-01T15:07:14.513 回答