All labels in my custom UITableViewCell are squished

Viewed 518

I can't seem to figure out why my UITableViewCell UILabels are all squished when I run in the simulator. Here is view of the Story View file:

Story Board

However, this is what I end up seeing in the simulator:

enter image description here

These are the following constraints that are applied:

enter image description here

I have implemented the protocol function for returning the height for a TableView row:

override func tableView(_ tableView: UITableView, heightForRowAt 
indexPath: IndexPath) -> CGFloat {
        return 65
     }

Lastly, when I analyze all of the UI elements in the debugger (e.g. po cell.namelabel.frame), I see that all of the frames of each of the elements make sense relative to container (both the origins and the sizes make is what I'd expect), and each element has the appropriate superview (the labels' superview is the content view, etc.).

1 Answers

SerialNumberLabel.top constraint needs to be defined, you can use NameLabel as a top reference.In addition to that issue, ValueLabel leading reference is also missing.

Related