The typical idiom is to try to dequeue a reusable cell. If that returns nil,
create a new cell. No matter whether it was dequeued or created, configure the
cell (i.e., assign values to labels, configure decorations, etc.). Dequeuing
saves you the overhead of creating new views but you still need
Roland, Luke and David,
I think you're right and I misunderstood the dequeue…
I looked at the AdvancedTableViewCells sample. Each time the dequeue… doesn't
return a cell, it loads a new cell from a xib file, so, I guess, in effect
creating a new cell.
I'll have to bundle my cell that is curren
I think you've missed the point of what Luke's saying. If
dequeueReusableCellWithIdentifier: returns nil then you create a cell with that
identifer, correct, and that cell can be recycled later by the tableview.
That's what the [ [ [ UITableViewCell ] alloc ] initWith... ] autorelease ]
does, s
On Jul 31, 2010, at 10:25 PM, Laurent Daudelin wrote:
> Isn't the purpose of dequeueReusableCellWithIdentifier: of reusing
> tableview's objects? I've used this in the past and it never failed me. The
> documentation says "For performance reasons, a table view'€™s data source
> should generally
Isn't the purpose of dequeueReusableCellWithIdentifier: of reusing tableview's
objects? I've used this in the past and it never failed me. The documentation
says "For performance reasons, a table view's data source should generally
reuse UITableViewCell objects when it assigns cells to rows in
Are you returning the same cell 4 times? That's not right. You're going to need
4 separate cell instances even if they are of the same class and layout. It
sounds like you might be taking 1 cell instance out of a nib and returning that
each time.
Luke
Sent from my iPhone.
On Jul 31, 2010, at
I've been banging my head on this for over a day now and I just can't find
what's wrong with my tableview and the tableview cells.
Basically, as you can see here:
http://nemesys.dyndns.biz/Images/iPhoneScreenshot.png
I have a table view made of 2 sections. Section 1 has only one tableview cell