disable the uitableview highlighting but allow the selection of individual cells

前端 未结 12 1247
心在旅途
心在旅途 2020-12-07 18:29

when you tap on a cell the row gets selected and highlighted.Now what i want to do is disable the highlighting but allow the selection.Is there a way around it.There is ques

12条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 18:44

    in swift 3

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

提交回复
热议问题