开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜