我的应用程序我有4个部分的uitableview。在每个部分中,有一些细胞必须与另一部分中的细胞不同。 所以在这个方法
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
我制作一个变量NSInteger row = [indexPath row];
这样我就得到了当前行(单元格)的编号。如何获取包含此行的部分的数量?
答案 0 :(得分:1)
非常简单:)
NSInteger section = [indexPath section];