In the editing status of tableview: [self. tableview setediting: Yes animated: No], the cell responds to the click event without changing the color, but can respond to the event as follows:
1. In cellforrowatindexpath, add a background view to the new cell: (set the background to white when the cell is selected)
Uiview * aview = [[uiview alloc] initwithframe: cell. Frame] autorelease];
Aview. backgroundcolor = [uicolor whitecolor];
Cell. selectedbackgroundview = aview;
2. Add the following to the response Click Event didselectrowatindexpath:Code:( Set the contentview background on the cell to white when selected, and set the textlabel on the contentview to white when selected)
[Self. tableview cellforrowatindexpath: indexpath]. textlabel. backgroundcolor = [uicolor whitecolor];
[[Self. tableview cellforrowatindexpath: indexpath]. contentview setbackgroundcolor: [uicolor whitecolor];
Therefore, the cell contains contentview, And the contentview contains textlabel.