First I have a uitableviewcontroller, where each UITableViewCell click will push another viewcontroller, each time you click on the cell, the cell will be selected, When returned from the push Viewcontroller, the selected cell is automatically unchecked. Later, for some reason, I changed this uitableviewcontroller to Uiviewcontroller, and then there was a problem: each time I returned to TableView, the previously selected cell could not be automatically unchecked and was found to know:
Uitableviewcontroller has a Clearsselectiononviewwillappear property,
And when the Uitableviewcontroller is modified to Uiviewcontroller, this attribute naturally does not exist, so we have to manually add the unchecked function, the method is simple, in the Viewwillappear method to add:
[Self.tableview Deselectrowatindexpath:[self.tableview Indexpathforselectedrow] Animated:YES];
Or add in TableView didselected Indexpath proxy method
[Self.tableview Deselectrowatindexpath:indexpath Animated:yes];
IOS UITableViewCell return unchecked when push is selected