开发者

iOS - Resize UILabel to match content?

I have a UILabel with linecount of 0. I set the text for this UILabel in code. How can I make the UILable to resize itself until it displays the full content? I don't want to take any space unless开发者_如何转开发 the text is long enough to be displayed in multiple lines.


You may be looking for [label sizeToFit]; That will get your label to crop tight on the text you give it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜