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
Post a Comment