I just upgraded to xcode 4.5 with iOS 6.0 and it's highlighting a warning on all the UILabels in my XIB files saying "minimum font size deprecated on ios version 6.0". Does anyone know what this is referring to and how to fix it?
Update: image is no more available (was at https://skitch.com/hahmadi82/eyk51/cloud)
Anything smaller than 5 pt will be extremely difficult to read, unless it's all capitalized. Even then, 4 pt font is about the smallest you can go. Keep in mind that some typefaces have thinner or lighter font weights, so just because one font is legible in 5 pt doesn't necessarily mean another one will be.
Sets the minimum amount that text in this view scales down to fit in the available space. iOS 13.0+ iPadOS 13.0+ macOS 10.15+ Mac Catalyst 13.0+ tvOS 13.0+ watchOS 6.0+
To change the font or the size of a UILabel in a Storyboard or . XIB file, open it in the interface builder. Select the label and then open up the Attribute Inspector (CMD + Option + 5). Select the button on the font box and then you can change your text size or font.
minimumFontSize
property of the UILabel
is deprecated from iOS 6.0 onwards.
An Alternative to the minimumFontSize
is minimumScaleFactor
. If you assign minimumFontSize/defaultFontSize
to minimumScaleFactor
, it works in the same way as minimumFontSize.
The Code is as follows - For Example the font size is 30.0 and if you want the minimum font size to be 12.0
YOURLABEL.font= [UIFont fontWithName:@"FONT_NAME" size:30.0]; [YOURLABEL setMinimumScaleFactor:12.0/[UIFont labelFontSize]];
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