File tree Expand file tree Collapse file tree 2 files changed +0
-39
lines changed
components/Typography/src Expand file tree Collapse file tree 2 files changed +0
-39
lines changed Original file line number Diff line number Diff line change @@ -77,19 +77,4 @@ UIKIT_EXTERN MDCTextStyle const MDCTextStyleOverline;
77
77
*/
78
78
- (nonnull UIFont *)scaledFontWithFont : (nonnull UIFont *)font ;
79
79
80
- /* *
81
- Scales an arbitrary value based on the current Dynamic Type settings and the scaling curve.
82
-
83
- This method calculates the current scale factor and multiplies it by the given value.
84
-
85
- As an example, assume the metrics value for @c .Large is 12 and the current @c
86
- UIContentCategorySize is
87
- @c .ExtraLarge with a metrics value of 24. When passed a @c value of 10, expect a return
88
- value of 20.
89
-
90
- @param value The original layout value.
91
- @return A value that has been scaled based on the attached scaling curve
92
- */
93
- - (CGFloat)scaledValueForValue : (CGFloat)value ;
94
-
95
80
@end
Original file line number Diff line number Diff line change @@ -280,30 +280,6 @@ - (UIFont *)scaledFontWithFont:(UIFont *)font {
280
280
return scaledFont;
281
281
}
282
282
283
- - (CGFloat)scaledValueForValue : (CGFloat)value {
284
- UIContentSizeCategory defaultSizeCategory = UIContentSizeCategoryLarge;
285
- // If it is available, query the preferredContentSizeCategory.
286
- UIContentSizeCategory currentSizeCategory = GetCurrentSizeCategory ();
287
-
288
- NSNumber *defaultFontSizeNumber = _scalingCurve[defaultSizeCategory];
289
- NSNumber *currentFontSizeNumber = _scalingCurve[currentSizeCategory];
290
-
291
- // Guard against broken / incomplete scaling curves by returning self if fontSizeNumber is nil.
292
- if (currentFontSizeNumber == nil || defaultFontSizeNumber == nil ) {
293
- return value;
294
- }
295
-
296
- CGFloat currentFontSize = (CGFloat)currentFontSizeNumber.doubleValue ;
297
- CGFloat defaultFontSize = (CGFloat)defaultFontSizeNumber.doubleValue ;
298
-
299
- // Guard against broken / incomplete scaling curves by returning self if fontSize <= 0.0.
300
- if (currentFontSize <= 0.0 || defaultFontSize <= 0.0 ) {
301
- return value;
302
- }
303
-
304
- return (currentFontSize / defaultFontSize) * value;
305
- }
306
-
307
283
- (NSString *)description {
308
284
NSString *superDescription = [super description ];
309
285
NSString *styleDescription = @" No Attached Style" ;
You can’t perform that action at this time.
0 commit comments