Why does UITableViewCell remain highlighted?

前端 未结 18 1265
余生分开走
余生分开走 2020-12-12 12:45

What would cause a table view cell to remain highlighted after being touched? I click the cell and can see it stays highlighted as a detail view is pushed. Once the detail

18条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 13:05

    Swift 3 Solution

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

提交回复
热议问题