react-native-macos/React
Eloy Durán 6bae7f93f5 Add suggested ‘view size’ powers to -[RCTShadowView setFrame:]
Summary:The UICollectionView example is actually my use-case, which is discussed in a
bit more detail [here](https://github.com/alloy/ReactNativeExperiments/issues/2).

----

This is useful when wrapping native iOS components that determine their
own suggested size and which would be too hard/unnecessary to replicate
in the shadow view. For instance a `UICollectionView` that after layout
will update its `contentSize`, which could be used to suggest a size to
the shadow view.

The reason for adding it to -[RCTShadowView setFrame:] is mainly so it
can be used via the existing -[RCTUIManager setFrame:forView:] API and
because it might not be a feature you want to expose too prominently.

An origin of `{ NAN, NAN }` is used as a sentinel to indicate that the
frame should be used as a size suggestion. The size portion of the rect
may contain a `NAN` to skip that dimension or a suggested value for the
dimension which will be used if no explicit styling has been assigned.

Examples:

* Without any expl
Closes https://github.com/facebook/react-native/pull/6114

Differential Revision: D2994796

Pulled By: nicklockwood

fb-gh-sync-id: 6dd3dd86a352ca7d31a0da38bc38a2859ed0a410
shipit-source-id: 6dd3dd86a352ca7d31a0da38bc38a2859ed0a410
2016-03-01 10:14:32 -08:00
..
Base Added unit tests for module init 2016-03-01 09:44:37 -08:00
Executors Expose way for native modules to modify JSC context 2016-02-15 12:58:29 -08:00
Layout updated css-layout and fixed callsites 2015-12-21 10:18:41 -08:00
Modules Add suggested ‘view size’ powers to -[RCTShadowView setFrame:] 2016-03-01 10:14:32 -08:00
Profiler fix RCTPerfMonitor display unit error 2016-02-26 04:54:32 -08:00
React.xcodeproj Fix OSS iOS build 2016-02-17 07:38:33 -08:00
Views Add suggested ‘view size’ powers to -[RCTShadowView setFrame:] 2016-03-01 10:14:32 -08:00