Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hacknicity/b70c740dc39d2cfa0912b4e4afbab488 to your computer and use it in GitHub Desktop.
Save hacknicity/b70c740dc39d2cfa0912b4e4afbab488 to your computer and use it in GitHub Desktop.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
ADTSystemFontTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[ADTSystemFontTableViewCell reuseIdentifier] forIndexPath:indexPath];
UIFontDescriptor *fontDescriptor = [self fontDescriptorAtIndexPath:indexPath];
NSDictionary *widthSetting = @{UIFontWidthTrait : @(-1.0)};
fontDescriptor = [fontDescriptor fontDescriptorByAddingAttributes:@{UIFontDescriptorTraitsAttribute: widthSetting}];
cell.fontDescriptor = fontDescriptor;
cell.title = [self titleForRowAtIndexPath:indexPath];
cell.showFontName = [ADTAppSettingsManager sharedInstance].showSystemFontsInfo.value;
return cell;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment