我执行在右边的表视图。正如你所看到的那样,细胞从桌子的视野中出来。 (它甚至跑一路下到谷底) 我曾尝试集小区cliptoBounds = true,但不工作
var boxes = ["Box 1", "Box 2", "Box 3", "Box 4", "Box 5"]
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = self.historyTableViewOutlet.dequeueReusableCell(withIdentifier: "HistoryCell", for: indexPath) as! HistoryVC
cell.boxName.text = boxes[indexPath.row]
return cell
}
在HistoryVC:`类HistoryVC:{UITableViewCell的
//MARK: Outlets
@IBOutlet weak var placeholderView: UIView!
@IBOutlet weak var boxName: UILabel!
}
有什么不对的吗?
盒子是否指不同的细胞? – Anuraj
确保您已在单元格中添加标签。 –
您是否试图增加截面高度 –