I want to display two UILabel
's, however UILabel
's having variable text length's According to textsize UIlabel
's width need to increase using auto-layouts.
For this I wrote below auto-layouts for both UIlabel
's
First Label:
1)leading Space
2)Top space
3)Width
4)height
5)Horizontal spacing
Second Label:
1)Trailing space
2)Top space
3)Width
4)height
how can we do this ?
Please help me.
my code:
textLabel1.numberOfLines = 0
textLabel1 .sizeToFit()
textLabel1.text = "asdfdsfdghjgjhkhkjlhjkhjk"
textLabel2.numberOfLines = 0
textLabel2 .sizeToFit()
textLabel2.text = "asdfdsfdghjgjhkhkjlhjkhjk"