in my UITableView sometimes cells stay selected after touching. Because it happens only occasionally, I\'m not able to reproduce the problem.
Any hints? Maybe it has
Solving this takes about two seconds once you learn how tables are managed.
As soon as cells are scrolled off screen, they lose their formatting. The table minimizes its memory usage by dismissing the other cells and recreating them if/when the user scroll back.
Even things like reloading table data, that really only applies to the cells on screen at that moment. Point being, the cellForRowAtIndexPath might create the same cell five times without the user ever hitting a button or leaving the view controller! So set it up to reload any formatting. Add something like this to cellForRowAtIndexPath:
if arrayOf_SelectedCells.contains(indexPath) {
setup_Selected(cell)
//Where setup_Selected is a custom function to apply formatt
} else {
setup_Unselected(cell)
}