uitableview - Problem with table view in iPhone -


here code creating cell


cell.textlabel.text=[listdata objectatindex:indexpath.row ];
if(indexpath.row==1)
cell.detailtextlabel.text=@"some text";
return cell;


here total 20 rows , 8 rows visible @ time

my problem detail text label repeated @ many rows when scrolling....

please help

try this:

cell.textlabel.text = [listdata objectatindex:indexpath.row]; if (indexpath.row == 1)     cell.detailtextlabel.text = @"some text"; else     cell.detailtextlabel.text = @""; return cell; 

table cells recycled, have reset every time.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -