Selection reset issue when scrolling a UITableView
I have 15 rows in my table. When I select the first row and scroll to last row of the table, and come to back to the first开发者_开发问答 row, my selection is reset. How can I fix this row selection reset issue when scrolling the table?
How are you selecting the row? Because of the table-cell reuse mechanism, just setting the selected
property on an individual cell usually won't work; calling -selectRowsAtIndexPaths:animated:
on the table view itself is the correct way to set its selection.
精彩评论