Remove RCTGetMultiplierForContentSizeCategory (#39617)

Summary:
It seems this method is not referenced by anything anymore. I think https://github.com/facebook/react-native/pull/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: https://github.com/facebook/react-native/pull/39617

Test Plan: CI should pass

Reviewed By: dmytrorykun

Differential Revision: D49618166

Pulled By: cipolleschi

fbshipit-source-id: fb72e961d2a1eb9977944fea3ee4deeab46b946b
This commit is contained in:
Saad Najmi
2023-10-09 08:37:41 -07:00
committed by Facebook GitHub Bot
parent 12eef6ea57
commit 6a2c245241
2 changed files with 0 additions and 29 deletions
@@ -23,10 +23,6 @@ typedef struct {
} RCTDimensions;
extern __attribute__((visibility("default"))) RCTDimensions RCTGetDimensions(CGFloat fontScale);
// Get font size multiplier for font base size (Large) by content size category
extern __attribute__((visibility("default"))) CGFloat RCTGetMultiplierForContentSizeCategory(
UIContentSizeCategory category) __deprecated;
#ifdef __cplusplus
}
#endif
@@ -29,28 +29,3 @@ RCTDimensions RCTGetDimensions(CGFloat fontScale)
return result;
}
CGFloat RCTGetMultiplierForContentSizeCategory(UIContentSizeCategory category)
{
static NSDictionary<NSString *, NSNumber *> *multipliers = nil;
static dispatch_once_t token;
dispatch_once(&token, ^{
multipliers = @{
UIContentSizeCategoryExtraSmall : @0.823,
UIContentSizeCategorySmall : @0.882,
UIContentSizeCategoryMedium : @0.941,
UIContentSizeCategoryLarge : @1.0,
UIContentSizeCategoryExtraLarge : @1.118,
UIContentSizeCategoryExtraExtraLarge : @1.235,
UIContentSizeCategoryExtraExtraExtraLarge : @1.353,
UIContentSizeCategoryAccessibilityMedium : @1.786,
UIContentSizeCategoryAccessibilityLarge : @2.143,
UIContentSizeCategoryAccessibilityExtraLarge : @2.643,
UIContentSizeCategoryAccessibilityExtraExtraLarge : @3.143,
UIContentSizeCategoryAccessibilityExtraExtraExtraLarge : @3.571
};
});
double value = multipliers[category].doubleValue;
return value > 0.0 ? value : 1.0;
}