質問

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