Reputation: 294
I am beginner iphone developer I want created table in programatically. In the table we take more than 20 row. But i have some problem that after 11th row the same value repeated.
plz help me with code and other method
Upvotes: 0
Views: 152
Reputation: 5589
You may want to look at this question which is the same problem. In that case, the person was setting the text of the cell only when creating a new cell (when nil
was returned from [tableView dequeueReusableCellWithIdentifier:]
.) It needs to be set every time the tableView:cellForRowAtIndexPath:
is called.
Upvotes: 1
Reputation: 10860
when you use reuseIdentifyer, the new cell to display is the cell that has just disappeared. so it will contain all the data from the disappeared cell. for example, if the cell, that has just disappeared, has detailDisclosureIndicator, the new cell will have it too even you don't set it.
Upvotes: 0