6bae7f93f5
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 |
||
---|---|---|
.. | ||
AnimatedGratuitousApp | ||
NavigationExperimental | ||
Navigator | ||
Thumbnails | ||
UIExplorer | ||
UIExplorer.xcodeproj | ||
UIExplorerIntegrationTests | ||
UIExplorerUnitTests | ||
android/app | ||
AccessibilityAndroidExample.android.js | ||
AccessibilityIOSExample.js | ||
ActionSheetIOSExample.js | ||
ActivityIndicatorIOSExample.js | ||
AdSupportIOSExample.js | ||
AlertExample.js | ||
AlertIOSExample.js | ||
AnimatedExample.js | ||
AppStateExample.js | ||
AppStateIOSExample.js | ||
AssetScaledImageExample.js | ||
AsyncStorageExample.js | ||
BorderExample.js | ||
BoxShadowExample.js | ||
CameraRollExample.js | ||
CameraRollView.js | ||
ClipboardExample.js | ||
DatePickerAndroidExample.js | ||
DatePickerIOSExample.js | ||
ExampleTypes.js | ||
GeolocationExample.js | ||
ImageCapInsetsExample.js | ||
ImageEditingExample.js | ||
ImageExample.js | ||
LayoutEventsExample.js | ||
LayoutExample.js | ||
LinkingExample.js | ||
ListViewExample.js | ||
ListViewGridLayoutExample.js | ||
ListViewPagingExample.js | ||
MapViewExample.js | ||
ModalExample.js | ||
NavigatorIOSColorsExample.js | ||
NavigatorIOSExample.js | ||
NetInfoExample.js | ||
PanResponderExample.js | ||
PickerAndroidExample.js | ||
PickerIOSExample.js | ||
PointerEventsExample.js | ||
ProgressBarAndroidExample.android.js | ||
ProgressViewIOSExample.js | ||
PushNotificationIOSExample.js | ||
RCTRootViewIOSExample.js | ||
README.md | ||
RefreshControlExample.js | ||
RootViewSizeFlexibilityExampleApp.js | ||
ScrollViewExample.js | ||
ScrollViewSimpleExample.js | ||
SegmentedControlIOSExample.js | ||
SetPropertiesExampleApp.js | ||
SliderIOSExample.js | ||
SnapshotExample.js | ||
StatusBarExample.js | ||
StatusBarIOSExample.js | ||
SwitchExample.js | ||
TabBarIOSExample.js | ||
TextExample.android.js | ||
TextExample.ios.js | ||
TextInputExample.android.js | ||
TextInputExample.ios.js | ||
TimePickerAndroidExample.js | ||
TimerExample.js | ||
ToastAndroidExample.android.js | ||
ToolbarAndroidExample.android.js | ||
TouchableExample.js | ||
TransformExample.js | ||
TransparentHitTestExample.js | ||
UIExplorerActions.js | ||
UIExplorerApp.android.js | ||
UIExplorerApp.ios.js | ||
UIExplorerBlock.js | ||
UIExplorerButton.js | ||
UIExplorerExampleList.js | ||
UIExplorerList.android.js | ||
UIExplorerList.ios.js | ||
UIExplorerNavigationReducer.js | ||
UIExplorerPage.js | ||
UIExplorerStateTitleMap.js | ||
UIExplorerTitle.js | ||
VibrationIOSExample.js | ||
ViewExample.js | ||
ViewPagerAndroidExample.android.js | ||
WebViewExample.js | ||
XHRExample.android.js | ||
XHRExample.ios.js | ||
XHRExampleCookies.js | ||
XHRExampleFetch.js | ||
XHRExampleHeaders.js | ||
bunny.png | ||
createExamplePage.js | ||
flux@3x.png | ||
hawk.png | ||
helloworld.html | ||
slider-left.png | ||
slider-left@2x.png | ||
slider-right.png | ||
slider-right@2x.png | ||
slider.png | ||
slider@2x.png | ||
uie_comment_highlighted@2x.png | ||
uie_comment_normal@2x.png | ||
uie_thumb_big.png | ||
uie_thumb_normal@2x.png | ||
uie_thumb_selected@2x.png |
README.md
UIExplorer
The UIExplorer is a sample app that showcases React Native views and modules.
Running this app
Before running the app, make sure you ran:
git clone https://github.com/facebook/react-native.git
cd react-native
npm install
Running on iOS
Mac OS and Xcode are required.
- Open
Examples/UIExplorer/UIExplorer.xcodeproj
in Xcode - Hit the Run button
See Running on device if you want to use a physical device.
Running on Android
You'll need to have all the prerequisites (SDK, NDK) for Building React Native installed.
Start an Android emulator (Genymotion is recommended).
cd react-native
./gradlew :Examples:UIExplorer:android:app:installDebug
./packager/packager.sh
Note: Building for the first time can take a while.
Open the UIExplorer app in your emulator.
See Running on Device in case you want to use a physical device.
Built from source
Building the app on both iOS and Android means building the React Native framework from source. This way you're running the latest native and JS code the way you see it in your clone of the github repo.
This is different from apps created using react-native init
which have a dependency on a specific version of React Native JS and native code, declared in a package.json
file (and build.gradle
for Android apps).