【发布时间】:2021-04-15 05:03:11
【问题描述】:
我有 2 个部分,都有 3 行。基本上我希望第 0 行第 0 行只有图像和标签组合。所有其他行将只包含文本。它在页脚上有一个注销。我该如何消除重复性,我知道这是因为我使用了 dequereuseable 单元格,但我找不到解决方法。
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "ImageCell", for: indexPath) as! ImageViewCell
cell.textLabel?.font = UIFont(name: "Lato", size: 20.0)
cell.contentView.layer.borderWidth = 0.05
cell.layer.cornerRadius = 8
cell.userFirstName.text = userFirstName
return cell
}
【问题讨论】:
标签: ios swift uitableview uikit