Change cell height while scrolling UITableView

Is there a way to dynamically change cell height while scrolling UITableView?

I need to change the height of the number of cells when the scroll position reaches a certain point, when the user drags it down. I can do this successfully by issuing reloadData, however it is very cool, as the cells just disappear.

I also tried reloading the cells and starting the start / end updates in the table view, however in both cases the animation sends a scroll scroll up.

I would like to animate the change in cell height without messing up the current offset of the drag and drop content.

Tim

+6
source share
1 answer

Use UITableViewDelegate and implement the method

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 

Will this solve your problem? If this is not the solution to your problem, try explaining your goal with examples / images.

0
source

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


All Articles