有的时候,我们需要在外部的函数中,获得cell。这个时候我们要用到cellforRowIndexpath这样的方法。这里我们既要创建一个indexpath才行。
NSIndexPath *indexPath2 = [NSIndexPath indexPathForRow:indexPath.row+count inSection:0];
SCSectionCell *sectionCell = [tableView cellForRowAtIndexPath:indexPath2];
[sectionCell.imgIcon setImage:[UIImage imageNamed:@"unchecked-mark"]];
可以看出NSIndexPath的创建主要是indexForRow方法