1

I am using the first answer on this question, and it is working, but when I reload my tableview, it is losing the text size. I have subclassed as the answer suggests. How do I get the UITableView to keep the system Dynamic Type size when the UITableView reloads?

The delegates are set, and again, when I have the UITableView in focus, switch to the Settings, adjust font size, and switch back to the UITableView, it reflects the change. When I reload the UITableView, the font is back to the standard size. I am using a standard detail cell.

Here is the code I use to set the look of the cell:

    cell.textLabel.text = building.name;
    [cell.textLabel setLineBreakMode:NSLineBreakByWordWrapping];
    [cell.textLabel setFont:[UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]];
    cell.detailTextLabel.text = building.address;
    [cell.detailTextLabel setLineBreakMode:NSLineBreakByWordWrapping];
    [cell.detailTextLabel setFont:[UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]];
XLE_22
  • 4,387
  • 3
  • 16
  • 61
Siriss
  • 3,617
  • 4
  • 30
  • 64

0 Answers0