Minimum Font Size deprecated on ios version 6.0
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
When developers see that minimumFontSize was deprecated on iOS 6, the replacement is usually not "do nothing." The modern approach is to let the label shrink proportionally by combining adjustsFontSizeToFitWidth with minimumScaleFactor. That keeps text readable while fitting within the available width in a way that matches newer UIKit behavior.
What Was Deprecated
Older UIKit code often looked like this:
The deprecated part is minimumFontSize. Apple replaced that API with a scaling-based model. Instead of specifying an absolute fallback size, you specify the minimum scale factor relative to the label’s original font.
Use minimumScaleFactor Instead
In modern UIKit, the usual replacement is:
This means:
- start from a 20-point font
- allow the label to shrink to 50 percent of that size
- keep the text on one line
So the effective minimum would be 10 points, but it is expressed as a scale rather than a fixed absolute value.
Why Apple Moved to Scale Factor
The scaling model works better with dynamic layout because it is relative to the label’s base font. If you later change the font from 20 points to 24 points, a minimumScaleFactor of 0.5 still behaves sensibly. The old fixed-size property did not adapt as elegantly when the base font changed.
This also made it easier for UIKit to reason about text fitting across different devices and layouts.
A Complete UIKit Example
Here is a small view controller example that shows the modern pattern:
If the text does not fit in the horizontal space, UIKit shrinks it until it reaches the configured minimum scale factor.
Understand the Relationship Between the Two Properties
minimumScaleFactor does not do anything by itself. It works together with adjustsFontSizeToFitWidth.
That means this setup is incomplete:
Without this, the label will not shrink:
You usually want both, especially for single-line labels that must fit into constrained horizontal space.
Consider Dynamic Type Too
Shrinking text to fit is not the same thing as supporting accessibility text sizes. If the label represents regular app content rather than a one-line badge or title, Dynamic Type may be a better answer than aggressive auto-shrinking.
For modern apps, that can look like:
Dynamic Type and minimumScaleFactor solve different problems:
- Dynamic Type respects user accessibility settings
- '
minimumScaleFactorhelps a specific label fit within a tight width'
Use them intentionally instead of treating shrinking as a universal typography solution.
Migrating Old Objective-C Code
If you are maintaining older Objective-C code, the same concept applies:
So migration from the deprecated property is usually straightforward. Replace the absolute minimum font size with a scale factor computed from your old intended minimum.
If the old code used a 20-point font and minimumFontSize of 12, the equivalent scale factor is 12.0 / 20.0, which is 0.6.
Common Pitfalls
The biggest mistake is setting minimumScaleFactor and expecting it to work without adjustsFontSizeToFitWidth. Another is leaving numberOfLines unconstrained when the real intent is single-line shrink-to-fit behavior. Developers also use scale factor to solve layout problems that should really be fixed with better constraints or line wrapping. Finally, shrinking text too aggressively can hurt readability, so a tiny minimum scale factor is rarely a good design choice.
Summary
- '
minimumFontSizewas deprecated, andminimumScaleFactoris the usual replacement.' - Use
minimumScaleFactortogether withadjustsFontSizeToFitWidth. - Think in terms of relative scaling from the base font, not a fixed fallback size.
- Convert old fixed sizes into a ratio when migrating legacy code.
- Use Dynamic Type for accessibility, not just label shrinking.
- Avoid relying on text shrinking to hide broader layout issues.

