swift tableViewCell touch.swift
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了swift tableViewCell touch.swift相关的知识,希望对你有一定的参考价值。
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if contentArray[indexPath.row] == numberArray[indexPath.row] {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
cell.textLabel?.text = contentArray[indexPath.row]
return cell
} else {
let cell = tableView.dequeueReusableCell(withIdentifier: "MoreCell", for: indexPath) as? CustomizeTableViewCell
cell?.contentLabel.text = numberArray[indexPath.row]
cell?.contentOneLabel.text = "\(numberArray[indexPath.row])內容一"
cell?.contentTwoLabel.text = "\(numberArray[indexPath.row])內容二"
return cell!
}
}
以上是关于swift tableViewCell touch.swift的主要内容,如果未能解决你的问题,请参考以下文章