I have a UITableView with cells that have a fixed height of 100 points. The cells are created in a xib file that uses 3 constraints to pin a UILabel to
UITableView
UILabel
Stupid bug! I've lost almost one day in this problem and finally I solved It with Steven Vandewghe's solution.
Swift version:
override func layoutSubviews() { super.layoutSubviews() self.contentView.layoutIfNeeded() self.myLabel.preferredMaxLayoutWidth = self.myLabel.frame.size.width }