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

时间:2021-05-23 19:31:44

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";