I have a table view where I would like to deselect a previously selected cell when returning to it from a detailed view or a newly added cell when the user creates an item.
However, since new items are sometimes added, the table is updated by calling reloadDatain viewWillAppear:. This means that none of the cells will be selected when the view appears, even if I have one self.clearsSelectionOnViewWillAppear = NO.
By selecting and deselecting a cell after the appearance of the table view (c viewDidAppear:), the animation time for deselecting is markedly different from the user (try it yourself, it is slower and does not feel slippery).
How can I keep a selection even after updating the table? (Please keep in mind, depending on the situation, I would like to deselect either the previously selected cell or the newly created cell.) Or do I need to somehow reload the data in my table differently?
source
share