From 90f959d0ab3de53225e851f78b55bf8434a63c69 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 14 Aug 2017 17:45:29 -0400 Subject: [PATCH] Respond to CR. // FREEBIE --- .../src/ViewControllers/AppSettingsViewController.m | 3 +-- Signal/src/util/UIFont+OWS.h | 2 +- Signal/src/util/UIFont+OWS.m | 11 ++++------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Signal/src/ViewControllers/AppSettingsViewController.m b/Signal/src/ViewControllers/AppSettingsViewController.m index b1a52d6f5..0939b3291 100644 --- a/Signal/src/ViewControllers/AppSettingsViewController.m +++ b/Signal/src/ViewControllers/AppSettingsViewController.m @@ -262,8 +262,7 @@ threadTitleLabel.text = NSLocalizedString( @"APP_SETTINGS_EDIT_PROFILE_NAME_PROMPT", @"Text prompting user to edit their profile name."); threadTitleLabel.textColor = [UIColor ows_materialBlueColor]; - threadTitleLabel.font = [UIFont ows_dynamicTypeTitle3Font]; - DDLogError(@"threadTitleLabel.font: %f", threadTitleLabel.font.pointSize); + threadTitleLabel.font = [UIFont ows_dynamicTypeHeadlineFont]; } threadTitleLabel.lineBreakMode = NSLineBreakByTruncatingTail; [threadNameView addSubview:threadTitleLabel]; diff --git a/Signal/src/util/UIFont+OWS.h b/Signal/src/util/UIFont+OWS.h index 9a3f19907..5eb182256 100644 --- a/Signal/src/util/UIFont+OWS.h +++ b/Signal/src/util/UIFont+OWS.h @@ -26,7 +26,7 @@ + (UIFont *)ows_dynamicTypeBodyFont; + (UIFont *)ows_dynamicTypeTitle2Font; -+ (UIFont *)ows_dynamicTypeTitle3Font; ++ (UIFont *)ows_dynamicTypeHeadlineFont; + (UIFont *)ows_infoMessageFont; + (UIFont *)ows_footnoteFont; diff --git a/Signal/src/util/UIFont+OWS.m b/Signal/src/util/UIFont+OWS.m index 67dd1b8a6..edf0ca36a 100644 --- a/Signal/src/util/UIFont+OWS.m +++ b/Signal/src/util/UIFont+OWS.m @@ -87,16 +87,13 @@ } } -+ (UIFont *)ows_dynamicTypeTitle3Font ++ (UIFont *)ows_dynamicTypeHeadlineFont { if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(9, 0)) { - return [UIFont preferredFontForTextStyle:UIFontTextStyleTitle3]; + return [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; } else { - // Dynamic title font for ios8 defaults to bold 12.0 pt, whereas ios9+ it's 22.0pt regular weight. - // Here we chose to break dynamic font, in order to have uniform style across versions. - // It's already huge, so it's unlikely to present a usability issue. - // Handy font translations: http://swiftiostutorials.com/comparison-of-system-fonts-on-ios-8-and-ios-9/ - return [self ows_regularFontWithSize:22.0]; + // See ows_dynamicTypeTitle2Font. + return [self ows_regularFontWithSize:17.0]; } }