public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier: "approve_cell");
let event = self.events[indexPath.row];
cell.textLabel?.text = event.name;
return cell;
}
我在 tableviewcell 中放置了 2 个图像和一个标签。当我运行该应用程序时,图像不可见。可能是什么原因?
最佳答案
检查您没有使用 UITableViewCell
的基本样式,因为如果您使用了,那么该样式仅包含标签……没有 ImageView 。将其更改为副标题或其中一个细节。
关于ios - Swift:放置在 tableviewcell 中的图像不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45625608/