react-native-macos/React
Adam Comella 22b3faf1ad iOS: Expose fontScale to JavaScript
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
2017-03-08 05:59:41 -08:00
..
Base Add build-time check that module methods are exported correctly 2017-03-07 10:45:36 -08:00
CxxBridge Drop calls to [RCTCxxBridge enqueueCallback:args:] on an invalid instance 2017-03-06 12:03:30 -08:00
CxxModule Move some utilities to RCTCxxUtils 2017-02-16 14:02:03 -08:00
CxxUtils Move RCTFollyConvert to the correct namespace 2017-02-16 06:59:27 -08:00
DevSupport Add a RCTPackagerClientMethod handler for pokeSamplingProfiler in DevMenu 2017-02-24 08:30:50 -08:00
Executors Fixes current CI failures and allows tree shaking of native dev support code. 2017-02-27 14:04:58 -08:00
Modules iOS: Expose fontScale to JavaScript 2017-03-08 05:59:41 -08:00
Profiler Fixes current CI failures and allows tree shaking of native dev support code. 2017-02-27 14:04:58 -08:00
React.xcodeproj Move iOS Maps out of the GitHub repo to internal fb codebase 2017-03-08 05:01:36 -08:00
ReactCxx.xcodeproj Upgrade double-conversion to 1.1.5 2017-03-07 12:08:40 -08:00
Views Move iOS Maps out of the GitHub repo to internal fb codebase 2017-03-08 05:01:36 -08:00
folly.xcconfig Fork React.xcodeproj to build the C++ bridge 2017-02-01 14:14:32 -08:00