嗨UITableView
,UITableViewCell
当用户单击单元格更改单元格标题时,我有我想要的类我如何在 Swift 中执行此操作?
实施
self.tableView.delegate = self
//
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let cell = tableView.cellForRow(at:indexPath) as! CellClassName
cell.titleLbl = ////// suppose here the outlet is titleLbl
// reflect this to model array to avoid reusing issues when you scroll
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句