AliSoftware / OHAttributedLabel

UILabel that supports NSAttributedString
https://github.com/AliSoftware/OHAttributedLabel/wiki
1.51k stars 344 forks source link

adjustsFontSizeToFitWidth #169

Closed mosca1337 closed 10 years ago

mosca1337 commented 10 years ago

I am trying to get OHAttributedLabel to automatically scale down the font according to the defined width of my OHAttributedLabel frame. I am looking for a method similar to

myLabel.adjustsFontSizeToFitWidth = YES;

Any suggestions?

AliSoftware commented 10 years ago

Unfortunately, it seems that Apple's CoreText framework does not have any method to do something like this, and as my lib is merely a wrapper around CoreText I can't see any mean to do this properly.

Keep me posted if you find a solution I'd be glad to merge it.