Question

I was testing adding a static image in an reused cell vs drawing it in the cell with drawrect method. I tested both methods and it seems drawing the image every time the cell gets in display is faster then adding the image to an reused cell.

Anyone knows, how this is possible? i have two more static images, should i draw these in drawrect or add them to the reused cell?

Thanks!

Was it helpful?

Solution

Define "adding a static image".

Pretty much any way you are adding it, the image view you are using has drawRect called to display the image.

By doing your own cell-level draw rect work, you take away some layers of calls and also have everything drawing on one layer (the cell) instead of compositing cell layers with UIImageView layers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top