Cancel the drawing of the chart


I have a UITableView that when I click on any cell the application draws a different area chart and the datasource of the chart is from network service.

I want to cancel the drawing of the chart if clicked new cell fast before the chart has been drawn.

Can someone help me in this situation?



Hi Mahmoudhelaly,

Have you tried getting rid of the current chart in the cell and replacing it with the new chart when a new cell is selected? Make sure the chart has been disposed of properly though or it may still use CPU resources after it has been removed from the superview.

Kind regards,

Daniel Allsop