I'm designing a table view with static cells in Interface Builder, and I want the text size to change to support dynamic type. I've created a cell with "Basic" style, which means it contains one automatic label, and set the size of the label to "Body". But the font is always 17 points regardless of the dynamic type setting. This doesn't happen with labels I manually add to "Custom" style cells.
The cell at the top is the problematic one. It's 17 points even though I've turned the dynamic type font size all the way down. The second cell was created by manually adding a label to a "Custom" style cell and setting the font size to "Body"; this is what the first cell should look like. The third label is a "Basic" style cell fixed at 17 points, for comparison.
MVCE is available here: https://drive.google.com/file/d/1-3di9-WWVsjcbktD6mxAyU4BrLR_g6nG/view. I unfortunately can't paste the code into the question because there is no code, only a storyboard. Here's how I made it:
- Create a new single view project
- Delete the view controller from the storyboard
- Add a new UITableViewController, set it as the initial view controller
- Select the table view and change "Content" to "Static Cells"
- For the first cell: change "Style" to "Basic", then select the label and change Font to Text Styles - Body
- Second cell: leave Style as Custom, drag in a label, and change Font to Text Styles - Body (same as above)
- Third cell: change Style to Basic and don't change text size