uitableviewuitextfieldreloaddata

how to change height cell in uitableview without reload data


I use UITableView and I want change the height of different cells. But I don't want use reload data for this because my table view contains UITextView which I edit in now and UIKeyBoard is up.


Solution

  • You're looking for the reloadRowsAtIndexPaths: method on the UITableView. It will trigger the recalculation of height (and subsequent redraw) of specific cells. It can even animate the adjustment so that you can do the update in real-time as the user is scrolling, such that the table view does not "jerk around" or "stutter step" while the heights are recalculated. I just implemented it successfully to do what you described.

    Source: Update UITableViewCell without reload