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.
To change the height of tableView cell in ios dynamically, i.e resizing the cell according to the content available, we'll need to make use of automatic dimension property. We'll see this with the help of an sample project.
reloadData()Reloads the rows and sections of the table view.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With