views:

149

answers:

1

Hi,

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!

A: 

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.

Kendall Helmstetter Gelner
By static i mean. Adding an image that doesn't change to all the cells.
Ton