3

我有 NSIndexPath* 类型的 indexPath,对 tableView 的引用,我想使用这些来获取相应单元格的句柄。我如何 dp 这样做?

4

1 回答 1

7
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

但请注意,如果相应的行目前不可见(或 indexPath 超出表的范围),该方法将返回 nil

于 2011-05-12T09:10:42.280 回答