我的 uitableview 的每个索引都有这个代码
if (indexPath.row == 6){
UIImageView *blog = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"blog.png"]];
[cell setBackgroundView:blog];
UIImageView *selectedblog = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"blogSel.png"]];
cell.selectedBackgroundView=selectedblog;
cell.backgroundColor = [UIColor clearColor];
[[cell textLabel] setTextColor:[UIColor whiteColor]];
return cell;}
我有两个部分,每个部分有 5 行。如何将 indexPath.row 1 到 5 放在第 1 节中,将 indexPath.row 6 到 10 放在第 2 节中?