[Solved] Changing background of cell in tableview behaves not as expected [closed]


When changing cell/textview backgorund color or any other attribute every
seventh cell/textview also accepts changes.

The Problem is due to re-usability of your UITableViewCell. Modify your -cellForRowAtIndexPath like this…

Sample Code :

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *reuseIdentifier = @"MyCellType";
    UITableViewCell *cell;
    //UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
    if(cell == nil) {
        /* You should Create your Cell Here */
    }
    // And Configure your Cell Here...
}

solved Changing background of cell in tableview behaves not as expected [closed]