how to change height cell in uitableview without reload data

Matrosov Alexander picture Matrosov Alexander · Aug 22, 2011 · Viewed 16.9k times · Source

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.

Answer

Zane Claes picture Zane Claes · Oct 18, 2011

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