In my project, there is a UILabel with text. The font size is 16pt. The text contents are changed depending on different cases. I hope it can automatically adju
UILabel
Using Auto Layout:
In the ViewController:
override func viewDidLoad() { super.viewDidLoad() sampleLabel.text = "Electrical Maintenance and Repair" sampleLabel.sizeToFit() }