ios - Moving a row in UITableView with many rows -


I have a UITableView thousands of rows The following code slows down the application for crawl:

  [tableView moveRowAtIndexPath: fromInexexPath toInexexPath: toIndexPath];  

The framework tells me that is calling both UITableView tableview: estimated heightsforoutoutpath: and tableView: heightForRowAtIndexPath: for all the rows ! Obviously, counting the heights of thousands of cells is a lot of stress for a simple step.

Is this the expected behavior? I do not understand why the requirement of all the cells to move UITableView to two is required. Is there anything I can do to avoid this?

I have a vanilla UITableView : tableView: heightForRowAtIndexPath: is called to move two rows for each line, then No matter what.

(It should be noted that fromIndexPath and toIndexPath are consistently index paths)


Comments