i have the following rows in an iphone table view and they sometimes leak the text from one of the rows to another.
if (row <1)
{
cell.detailTextLabel.text=@"h3ello";
UIImage *image = [UIImage imageNamed:@"icon.png"];
cell.imageView.image = image;
}
else if (row ==2)
{
cell.detailTextLabel.text=@"world";
UIImage *image = [UIImage imageNamed:@"ticon.png"];
cell.imageView.image = image
}
and sometimes these images get screwed up in between and also i have another row that includes a text color. This causes various and random rows get the red color when i am scrolling. im not sure what the error is..
EDIT
This is the culprit involved
cell.textLabel.textColor = [UIColor redColor];
once i remove this none of the rows get mixed up with the colors. how can i implement this color to a specific row without it leaking onto the others randomly.