Skip to content

Commit 6a2c245

Browse files
Saadnajmifacebook-github-bot
authored andcommitted
Remove RCTGetMultiplierForContentSizeCategory (#39617)
Summary: It seems this method is not referenced by anything anymore. I think #35017 made it redundant. Let's remove it? I can also do the whole "Deprecate for one version, remove in the next" since this was publicly exported. ## Changelog: [iOS] [REMOVED] - Remove RCTGetMultiplierForContentSizeCategory Pull Request resolved: #39617 Test Plan: CI should pass Reviewed By: dmytrorykun Differential Revision: D49618166 Pulled By: cipolleschi fbshipit-source-id: fb72e961d2a1eb9977944fea3ee4deeab46b946b
1 parent 12eef6e commit 6a2c245

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

packages/react-native/React/UIUtils/RCTUIUtils.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ typedef struct {
2323
} RCTDimensions;
2424
extern __attribute__((visibility("default"))) RCTDimensions RCTGetDimensions(CGFloat fontScale);
2525

26-
// Get font size multiplier for font base size (Large) by content size category
27-
extern __attribute__((visibility("default"))) CGFloat RCTGetMultiplierForContentSizeCategory(
28-
UIContentSizeCategory category) __deprecated;
29-
3026
#ifdef __cplusplus
3127
}
3228
#endif

packages/react-native/React/UIUtils/RCTUIUtils.m

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,3 @@ RCTDimensions RCTGetDimensions(CGFloat fontScale)
2929

3030
return result;
3131
}
32-
33-
CGFloat RCTGetMultiplierForContentSizeCategory(UIContentSizeCategory category)
34-
{
35-
static NSDictionary<NSString *, NSNumber *> *multipliers = nil;
36-
static dispatch_once_t token;
37-
dispatch_once(&token, ^{
38-
multipliers = @{
39-
UIContentSizeCategoryExtraSmall : @0.823,
40-
UIContentSizeCategorySmall : @0.882,
41-
UIContentSizeCategoryMedium : @0.941,
42-
UIContentSizeCategoryLarge : @1.0,
43-
UIContentSizeCategoryExtraLarge : @1.118,
44-
UIContentSizeCategoryExtraExtraLarge : @1.235,
45-
UIContentSizeCategoryExtraExtraExtraLarge : @1.353,
46-
UIContentSizeCategoryAccessibilityMedium : @1.786,
47-
UIContentSizeCategoryAccessibilityLarge : @2.143,
48-
UIContentSizeCategoryAccessibilityExtraLarge : @2.643,
49-
UIContentSizeCategoryAccessibilityExtraExtraLarge : @3.143,
50-
UIContentSizeCategoryAccessibilityExtraExtraExtraLarge : @3.571
51-
};
52-
});
53-
54-
double value = multipliers[category].doubleValue;
55-
return value > 0.0 ? value : 1.0;
56-
}

0 commit comments

Comments
 (0)