UITableView doesn't keep row selected upon return

后端 未结 7 1010
独厮守ぢ
独厮守ぢ 2020-12-17 21:05

i have several table views in my app. I am familiar with the usual behaviour of tables, that when you select a row and progress to a pushed view, it turnes blue, then when y

7条回答
  •  清歌不尽
    2020-12-17 21:43

    I am not sure if this is relevant but there is a flag in UITableViewController I just noticed called

    @property(nonatomic) BOOL clearsSelectionOnViewWillAppear NS_AVAILABLE_IOS(3_2); // defaults to YES. If YES, any selection is cleared in viewWillAppear:
    

    I think this should solve some of the problems people are describing here.

提交回复
热议问题