I've got a custom UITableViewCell
subview that has a button on it which has a background color representing a priority. The user is allowed to drag the cells around in the table, which changes the priority of the object represented by that row. I want to update the color of the button when they're done, so I've implemented this:
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
//update data source
theCell.button.backgroundColor = newColor;
}
This works insofar as the background color of the button changes as soon as I let up on the move control. However, once the cell animates into place, the background color changes back to its previous color. Other values on the cell are changed properly (if, for example, I change the text, it stays changed).
Any thoughts on what's wrong or a workaround?