22b3faf1ad
Summary: A related Android PR is #11008. Font scale was exposed through: - The `getContentSizeMultiplier` method - The `didUpdateContentSizeMultiplier` event These are now deprecated. The reason is that there was already an API that exposed font scale. However, it was Android only. We now expose font scale through that API on iOS as well. Specifically: - Font scale is now available as `PixelRatio.getFontScale()`. - The `change` event on the `Dimensions` object now fires when font scale changes. This change also adds support for `Dimensions.get('screen')` on iOS. Previously, only `Dimensions.get('window')` was available on iOS. The motivation is that, [according to this comment](https://github.com/facebook/react-native/pull/11008#issuecomment-275123609), we'd like to deprecate `window` dimensions in favor of `screen` dimensions in the future. **Test plan (required)** Verified that `PixelRatio.getFontScale()` and the `change` event work properly in a test app. Adam Comella Microsoft Corp. Closes https://github.com/facebook/react-native/pull/12268 Differential Revision: D4673642 Pulled By: mkonicek fbshipit-source-id: 2602204da6998a96216e06f5321f28f6603e4972 |
||
---|---|---|
.. | ||
Base | ||
CxxBridge | ||
CxxModule | ||
CxxUtils | ||
DevSupport | ||
Executors | ||
Modules | ||
Profiler | ||
React.xcodeproj | ||
ReactCxx.xcodeproj | ||
Views | ||
folly.xcconfig |