4
I have a label inside a scrollView, and this label gets an N text, some are small and some are big so the idea was to put in scrollView, but the problem is that I can’t adjust the label to increase as the text, it cuts the rest of the line. The scrollView is not big is just a small part of the screen.
I’ve tried that in the code, but it didn’t work
@IBOutlet weak var svPergunta: UIScrollView!
@IBOutlet weak var lblPergunta: UILabel!
var sPergunta = String()
override func viewDidLoad() {
super.viewDidLoad()
lblPergunta.adjustsFontSizeToFitWidth = true
lblPergunta.text = sPergunta
lblPergunta.lineBreakMode = NSLineBreakMode.ByWordWrapping
svPergunta.contentSize.height = 200
}