dequeueReusableCell:withIdentifier: returns a cell even if it is not there?
Posted
by lostInTransit
on Stack Overflow
See other posts from Stack Overflow
or by lostInTransit
Published on 2010-05-13T07:11:52Z
Indexed on
2010/05/13
7:14 UTC
Read the original article
Hit count: 1402
Hi
I am using SDK 3.2 to create an iPad application. In my table I have 2 kinds of rows, one with a custom accessory view and another without any.
I use two different cell identifiers for creating these.
The first cell is created properly (dequeueReusable... returns a nil and the cell is initialized). But when a call is made to dequeueReusable.. with the other cell identifier, the cell is not nil (it should be because this is the first time the identifier is being used)
An even stranger part is that when I use this cell to set the textLabel's text, it returns an EXC_BAD_ACCESS.
So 2 questions
Why is dequeueReusable... returning a cell when there is no cell created using the said identifier
Even if it does return a cell, why is access to textLabel causing a crash?
Thanks.
© Stack Overflow or respective owner