重命名单元格的文本 - iPhone SDK

时间:2022-12-03 18:22:58

Is there anyway of renaming a specific cell's text? I know what the row number is, but I don't know how to change the cell title.

有没有重命名特定单元格的文本?我知道行号是什么,但我不知道如何更改单元格标题。

1 个解决方案

#1


6  

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.textLabel.text = "new text";

#1


6  

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.textLabel.text = "new text";