我執行在右邊的表視圖。正如你所看到的那樣,細胞從桌子的視野中出來。 (它甚至跑一路下到谷底) 我曾嘗試集小區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
確保您已在單元格中添加標籤。 –
您是否試圖增加截面高度 –