How to fix the textlabel of cell have different spacing bettween text and image how to fix this this table is creating by coding
class NewMessageCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: .subtitle, reuseIdentifier: reuseIdentifier)
}
override func layoutSubviews() {
super.layoutSubviews()
self.imageView?.frame = CGRect(x: 5, y: 10, width: 70, height: 70)
self.imageView?.clipsToBounds = true
self.textLabel?.highlightedTextColor = UIColor.blue
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}