views:

446

answers:

1

I have a UITextField inside a TableViewCell where a player enters their name. I have limited space (78 units) for the control. I'd like the font to be as large as possible (Helv 16) for easy readability but also scale down for longer names. (min size 8) I thought that "Adjust to Fit" in Interface Builder would do the trick but alas it doesn't. The font is always the same size no matter what length of text is in the control. :(

I tried setting the values programmaticly using adjustsFontSizeToFitWidth property along with a minimumFontSize but that doesn't work either. Just to be thorough I tried expanding the size of the control even though I don't have room and then it sorta works. I get a smaller font but still no where near the minimum font specified.

Is this just a known bug in the SDK or am I missing something?

+2  A: 

I think it's a bug that occurs when your label is multiple lines. See this Apple discussion.

brainfsck
This doesn't apply to UITextField, though. It doesn't have multiple lines. I was hoping to support a very simple case: Big fonts for short names. Smaller fonts for long names. No multiple words or lines. I'll just submit a bug report to Apple.