Don't use scaledFontForFont.

This commit is contained in:
Matthew Chen 2018-04-09 16:27:05 -04:00
parent 3ba3f10992
commit 180cbbcdb3
1 changed files with 1 additions and 9 deletions

View File

@ -122,15 +122,7 @@ NS_ASSUME_NONNULL_BEGIN
// But this doesn't seem to work in practice on iOS 11 using UIFontWeightMedium.
UIFont *derivedFont = [UIFont systemFontOfSize:self.pointSize weight:UIFontWeightMedium];
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
return [[UIFontMetrics defaultMetrics] scaledFontForFont:derivedFont];
#pragma clang diagnostic pop
} else {
return derivedFont;
}
return derivedFont;
}
@end