문제

I want to use the sizeToFit method to display a variable amount of text in a UILabel. It works perfectly to show all the text...but is there a way to use sizeToFit up to a certain maximum frame height.

In other words, I want to have sizeToFit increase the frame size up to a certain point, so that more text is shown, but not necessarily all the text.

Is there some work around or method that could do that?

Thanks! xcode 4.3.3

도움이 되었습니까?

해결책

I think you can get the dynamic width and set it to the label using font size and text string..

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top