mirror of
https://github.com/react/react-native.git
synced 2026-09-28 05:13:06 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot 5
parent
b4dc5e3e81
commit
6bae7f93f5
+1
-8
@@ -10,16 +10,9 @@ if [ -z "$1" ]
|
||||
exit 255
|
||||
fi
|
||||
|
||||
xctool \
|
||||
-project IntegrationTests/IntegrationTests.xcodeproj \
|
||||
-scheme IntegrationTests \
|
||||
-sdk iphonesimulator8.1 \
|
||||
-destination "platform=iOS Simulator,OS=${1},name=iPhone 5" \
|
||||
build test
|
||||
|
||||
xctool \
|
||||
-project Examples/UIExplorer/UIExplorer.xcodeproj \
|
||||
-scheme UIExplorer \
|
||||
-sdk iphonesimulator8.1 \
|
||||
-sdk iphonesimulator${1} \
|
||||
-destination "platform=iOS Simulator,OS=${1},name=iPhone 5" \
|
||||
build test
|
||||
|
||||
Reference in New Issue
Block a user