Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
I have a table view. only one cell will have style1 cell and remaining all cells are default cells.
For style1 cell, I am displaying detailed text along with accessory.
Its compiling and staring the app well.
But when I scroll table veiw up/down, the detailed text is being shown in a different cell. i'm attaching the code as attachment.
can some help me in fixing this.

--Satyam.
 

Attachments

  • ListenToRadio.zip
    36.7 KB · Views: 67
The problem is when cell != nil, it's reusing a previously created cell, one that already has its style set. So, when row 0 goes offscreen, row 11 (labelled 12) grabs that cell out of the queue to use for itself, but since it didn't need to create it, it won't set the style.

EDIT: You may want to consider using a couple of different CellIdentifiers as part of your reuse strategy.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.