I am currently trying to achieve the dynamic cells functionality. I have in fact achieved it but using only a dateLabel, nameLabel and the detailLabel. I want to include an image on the left (authorProfileImg). I have tried multiple iterations and combinations of constraints for my 4 elements and I have not succeeded yet.

```
class BookTableViewCell: UITableViewCell {

    let nameLabel = UILabel(frame: .zero)
    let detailLabel = UILabel(frame: .zero)

    let dateLabel = UILabel(frame: .zero)
    let authorProfileImg = UIImageView(frame: .zero)

    // MARK: Initalizers
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)

        let marginGuide = contentView.layoutMarginsGuide

        // configure titleLabel //the upper element
        contentView.addSubview(nameLabel)
        nameLabel.translatesAutoresizingMaskIntoConstraints = false

        nameLabel.leadingAnchor.constraint(equalTo: marginGuide.leadingAnchor, constant: 60).isActive = true
        nameLabel.topAnchor.constraint(equalTo: marginGuide.topAnchor).isActive = true
        nameLabel.trailingAnchor.constraint(equalTo: marginGuide.trailingAnchor).isActive = true

        nameLabel.numberOfLines = 0
        nameLabel.font = UIFont(name: "Arial", size: 16)

        // configure authorLabel //the lower element
        contentView.addSubview(detailLabel)
        detailLabel.translatesAutoresizingMaskIntoConstraints = false

        detailLabel.leadingAnchor.constraint(equalTo: marginGuide.leadingAnchor, constant: 60).isActive = true
        //        detailLabel.bottomAnchor.constraint(equalTo: marginGuide.bottomAnchor).isActive = true
        detailLabel.trailingAnchor.constraint(equalTo: marginGuide.trailingAnchor, constant: -20).isActive = true
        detailLabel.topAnchor.constraint(equalTo: nameLabel.bottomAnchor, constant: 5).isActive = true

        detailLabel.numberOfLines = 0
        detailLabel.font = UIFont(name: "Arial", size: 13)
        detailLabel.textColor = UIColor.lightGray

        // configure dateLabel
        contentView.addSubview(dateLabel)
        dateLabel.translatesAutoresizingMaskIntoConstraints = false

        dateLabel.leadingAnchor.constraint(equalTo: marginGuide.leadingAnchor, constant: 60).isActive = true
        dateLabel.bottomAnchor.constraint(equalTo: marginGuide.bottomAnchor).isActive = true
        dateLabel.trailingAnchor.constraint(equalTo: marginGuide.trailingAnchor).isActive = true
        dateLabel.topAnchor.constraint(equalTo: detailLabel.bottomAnchor, constant: 5).isActive = true

        dateLabel.numberOfLines = 0
        dateLabel.font = UIFont(name: "Arial", size: 12)
        dateLabel.textColor = UIColor.red
        dateLabel.text = "Jun 5"

        // configure author image
        contentView.addSubview(authorProfileImg)
        authorProfileImg.translatesAutoresizingMaskIntoConstraints = false

        authorProfileImg.widthAnchor.constraint(equalToConstant: 50).isActive = true
        authorProfileImg.heightAnchor.constraint(equalToConstant: 50).isActive = true
        authorProfileImg.layer.cornerRadius = 50

        authorProfileImg.leadingAnchor.constraint(equalTo: marginGuide.leadingAnchor).isActive = true
        authorProfileImg.topAnchor.constraint(equalTo: marginGuide.bottomAnchor).isActive = true

        authorProfileImg.bottomAnchor.constraint(equalTo: marginGuide.bottomAnchor).isActive = true
//        authorProfileImg.trailingAnchor.constraint(equalTo: detailLabel.leadingAnchor).isActive = true
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}

```

**What am I doing wrong here?**