Vertically align text to top iOS UILabel
Solution:
You cannot be able to align the label vertically.At the same time you can be able to set the number of line in UILabel.If you set that number of lines only if you want constantly particular number of lines.
For example if you want that label will display only 2 lines then set the number of lines to 2.
Otherwise you have to set that number of lines equal to 0 and call sizetofit.
myLabel.numberOfLines = 0
You cannot be able to align the label vertically.At the same time you can be able to set the number of line in UILabel.If you set that number of lines only if you want constantly particular number of lines.
For example if you want that label will display only 2 lines then set the number of lines to 2.
Otherwise you have to set that number of lines equal to 0 and call sizetofit.
myLabel.numberOfLines = 0
myLabel.sizeToFit()
Comments
Post a Comment