UITableView does not automatically deselect the selected row when the table re-appears

前端 未结 7 573
感动是毒
感动是毒 2021-02-03 17:45

Normally a selected row in a UITableView gets deselected with an animation when the user pops back from the detail view.

However, in my case where I have a

7条回答
  •  抹茶落季
    2021-02-03 18:12

    In Swift 3 / 4

    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        tableView.deselectRow(at: indexPath, animated: true)
    }
    

提交回复
热议问题