Author Topic: How do I fix Xcode's "Minimum Font Size greater than current font size" warning?  (Read 7700 times)


  • Administrator
  • *****
  • Posts: 719
    • View Profile
If you click on Xcode's "Minimum Font Size greater than current font size" warning, it doesn't provide a visual cue that lets you know which UI object is causing the problem. To find and fix the warning:

1. In the Project Navigator, right-click your storyboard file and select Open As > Source Code.
2. Search for "minimumFontSize" in the storyboard.
3. For each instance you find, compare the associated fontDescription node and check if its pointSize value is smaller than the minimumFontSize value. When you find one that's bigger, that's the control causing the problem! You can then close the storyboard source code file, click on the storyboard and adjust the Minimum Font Size attribute.

For example, the following label's minimumFontSize is 22, but its pointSize is 20:

Code: [Select]
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Winner" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="22" translatesAutoresizingMaskIntoConstraints="NO" id="igZ-mS-s3L">
  <fontDescription key="fontDescription" type="system" pointSize="20"/>

All the best!
Kevin McNeish
Author of Learn to Code in Swift:
« Last Edit: May 24, 2015, 01:04:00 PM by kjmcneish »