3advance
3advance

Reputation: 295

identifying the adjusted font size of a UILabel

One of my labels is auto resizing to fit the text. How do I find out what the new dynamic size is? I want to match another label to this adjusted size.

Upvotes: 1

Views: 572

Answers (1)

Bjarne Mogstad
Bjarne Mogstad

Reputation: 1154

There is not native method to get the font size, but you can calculate the font size by using NSString's method sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode:

Upvotes: 2

Related Questions