Reload UITableViewCell without scrolling UITableView

I use UISegmentedControlthat modifies the contents UITableViewCell. After changing the segment, I need to reload the cell to update its height. I do this by calling:

[self.tableView reloadRowsAtIndexPaths:@[self.segmentIndexPath] withRowAnimation:UITableViewRowAnimationNone];

However, this does scroll UITableViewup. What is the best way to do this without scrolling through the table?

+4
source share
1 answer

Try using [self.tableView visibleCells]and then find this cell and change

-1
source

Source: https://habr.com/ru/post/1610301/


All Articles