Tinggi dinamis Uilabel Swift berdasarkan panjang teks

let myLabel = UILabel()
// Set leading and trailing constraints, and either top/bottom constraint,
//   likely done within Storyboard
myLabel.numberOfLines = 0
myLabel.sizeToFit()
TheKrisinator