Swift TableViewCell将不会完全显示

Swift TableViewCell将不会完全显示,swift,uitableview,constraints,Swift,Uitableview,Constraints,如果没有可用的帖子,我想显示以下默认单元格: 这一次,我的手机将显示如下: 我已经在viewDidLoad中设置了以下代码行: tableView.estimatedRowHeight = 150 tableView.rowHeight = UITableView.automaticDimension 在mycellForRowAt中,我设置了以下几行: func tableView(_ tableView: UITableView, cellForRowAt indexPath: Ind

如果没有可用的帖子,我想显示以下默认单元格:

这一次,我的手机将显示如下:

我已经在
viewDidLoad
中设置了以下代码行:

tableView.estimatedRowHeight = 150
tableView.rowHeight = UITableView.automaticDimension
在my
cellForRowAt
中,我设置了以下几行:

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    switch self.postArray.count {

    case 0:
        let cell = tableView.dequeueReusableCell(withIdentifier: "KeineBeiträgeVorhanden")!
        return cell

    default:

    let cell = tableView.dequeueReusableCell(withIdentifier: "DiscoveryCollectionViewCell", for: indexPath) as! DiscoveryCollectionViewCell
但是我的TableViewCell显示的大小不正确。 提前感谢您的帮助

祝大家圣诞快乐

图像约束

( top , centerX ) => to superView , width , height
top => to image , ( leading , trailing , bottom ) => to superView 
标签约束

( top , centerX ) => to superView , width , height
top => to image , ( leading , trailing , bottom ) => to superView 

.lines=0

您可以分享您的垂直限制吗?谢谢。问题是缺少从标签到tableviewcell底部的约束。