目标C:访问UITableView的下一个单元格

时间:2010-09-01 16:07:28

标签: iphone objective-c uitableview

我如何访问(更改imageView.image)我已经拥有的UITableView的下一个单元格:

UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

1 个答案:

答案 0 :(得分:6)

NSIndexPath *newPath = [NSIndexPath indexPathForRow:indexPath.row+1 inSection:indexPath.section];
UITableViewCell *nextCell = [tableView cellForRowAtIndexPath: newPath];