I've got a UILabel with font size set to 24.0. I've configured it so that it can autoshrink the font size down to a minimum of 12.0. When I get the font from the label, it says it is 24.0, even though that's not the size it is using to actually display the text.
How can I get what font size it is really using?
Note: I'm not asking how to draw the text, the text is already visible in a UILabel.
From what I know, you can't actually get it directly, but you can use the sizeWithFont:minFontSize:actualFontSize:lineBreakMode: method to compute it. But be aware that the method is deprecated in iOS 7 and that Apple discourages using a variable font size for labels, because it doesn't provide a consistent experience to the user.
Hope that helps :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With