Merge branch 'charlesmchen/dynamicTextFixes'

This commit is contained in:
Matthew Chen 2018-04-10 09:55:32 -04:00
commit a6afa2cc06

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