title: How to make UITableView row height respond to user's preferred text size (Dynamic Type)?
body: <p>I would like the <code>UITableView</code>'s row height to respond to changes in the user's preferred text size. For example, when the preferred text size increases, I would like to increase the row height by a proportional amount. Here's what I have so far:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
      [super viewWillAppear:animated];
  
      [self.tableView reloadData];
  
      // observe when user changes preferred text size
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(preferredContentSizeChanged:) name:UIContentSizeCategoryDidChangeNotification object:nil];
  }
  
  - (void)preferredContentSizeChanged:(NSNotification *)notification
  { 
      [self.tableView reloadData];
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *cellID = @"Cell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID forIndexPath:indexPath];
  
      // leverage Text Kit's Dynamic Type
      cell.textLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
  
      cell.textLabel.text = @"All work and no play...";
  
      return cell;
  }
  </code></pre>
  
  <p>So what's the best way to calculate a row height that reflects the user's preferred text size?</p>