Hello,
I am using following method in my application:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row == 0)
{
cell.contentView.backgroundColor = [UIColor lightGrayColor];
cell.contentView.alpha = 0.5;
}
}
When I run the application I have 7 rows in my table. According to above function only the cell of first row (row number 0) should be formatted (because of the if condition).
Cell of 1st row (row number 0) is formatted properly (as per desired output). But if I scroll the table down one more cell is displayed as formatted: cell at row number 5.
Why so?