|Aug 23, 2008, 11:49 AM||#1|
Multi-line UILabel adjustFontSizeToFitWidth
Has anyone figured out how to get the auto font size adjustment to work for a UILabel when it has numberOfLines set to more than one? It seems to just ignore adjustFontSizeToFitWidth if the label has more than one line.
|Oct 2, 2008, 01:19 PM||#5|
Dynamic number of lines with a fixed font size is exactly what UILabel gives you if you set the numberOfLines to zero. The usual reason to use adjustsFontSizeToFitWidth is if you have a fixed size for the label and you want all the text to fit. If you can allow the label to be any height then you don't need that.
Also you could probably use sizeWithFont:constrainedToSize:lineBreakMode to find the font size that will show all the text in a multiline label and then set that font size for the label.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|How would you handle multi device/multi-service sync?||rsarno||MacBook Pro||0||Oct 23, 2013 02:17 PM|
|Writing value to UILabel||Kapthehat||iPhone/iPad Programming||6||Jul 19, 2013 09:32 AM|
|UILabel Help||lukin||iPhone/iPad Programming||3||Sep 18, 2012 08:36 PM|
|Stupid UILabel question||mngoose||iPhone/iPad Programming||7||Jun 11, 2012 09:58 PM|
All times are GMT -5. The time now is 09:26 AM.