Search code examples
objective-ciosuitableviewhighlighting

Objective C: How to highlight a tableView Cell and keep it highlighted when table is reloaded?


Really need some advice for this. I am trying to do a couple of things. 1) Set the first cell of the table view to be highlighted the first time the table is loaded. The user can then proceed to select/highlight other cells in the table. How can I highlight the cell for the very first time?

2) After some changes are made to the values in a row, I will reload the table data, however this will remove the highlight on the cell. Is there any way to keep the cell highlighted even after table reload.

Thanks!

Zhen


Solution

  • Try selectRowAtIndexPath:animated:scrollPosition: