2
votes

here's my issue:

I have a UITableView and in each cell I display some UILabels, like below:

----------------
|      "A"     |
----------------
|      "B"     |
----------------
|      "C"     |
----------------

Each cell is tap-able and when tap it pushes to another view to allow user to add some cell content. When user finish adding, the view pops back.
I want to see the UITable cell is statically updated with a new label that user added. For example, if user added some content to the first cell (previously with one label "a"), then after view pops back the cell should have two labels, which should look like:

----------------
|      "A"     |
|     "New"    |
----------------
|      "B"     |
----------------
|      "C"     |
----------------

I don't want to reload the entire table (which will drain data and lost previous cell position). Is there a way I can re-load this specific cell with new height/content? or statically adjust the cell-height?

Thank you

1

1 Answers

2
votes

Yes you can reload particular cell in table view while relaoding the cell you can set cell height.

 NSArray* rowsToReload = [NSArray arrayWithObjects:self.selectdIndexPath, nil];
 [self.tableview reloadRowsAtIndexPaths:rowsToReload withRowAnimation:UITableViewRowAnimationNone];