Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the "automatically adjusts font requires using a dynamic type text style" warning mean?

  1. Open your storyboard as Source Code
  2. Search for key "adjustsFontForContentSizeCategory"
  3. Check which object has this option and uncheck Dynamic Type checkbox from interface builder.

I just changed Text style to Body & Warning vanishes.

It's Just because it is dynamic type textStyle

See list of predefined supported dynamic type textStyle -

enter image description here


I had the same problem. Even after I opened the storyboard as source and removed the "adjustsFontForContentSizeCategory" key, saved and cleaned the project it would still show.

So then I:

  1. Cleaned the project
  2. Closed Xcode
  3. Deleted the derived data folder contents
  4. Re-Opened Xcode and rebuilt

It was gone. :)


It seems to have been a bug in Xcode. This is what I did to fix it:

  1. Change the font in the label that showed the error, to a dynamic type, as suggested
  2. Select check box for "Automatically Adjusts Font"
  3. Build and run the project (the error disappears)
  4. Uncheck the "Automatically Adjusts Font" box
  5. Change the font back to the previous setting that caused the error
  6. Rebuild the project

The error is still gone.


If the "Automatically adjusts font" box is checked with a non dynamic font this warning will appear. Either uncheck the box on the offending label or use a dynamic font type.

enter image description here


  1. Open your storyboard, right click storyboard in file navigator.

enter image description here

  1. Search for (command F) and delete instances of adjustsFontForContentSizeCategory="YES"

In the Storyboard, after uncheck every "Automatically Adjusts Font" in the Attributes Inspector, run shift + command + K and then build your project again. This should clean your project and remove the warning.