react-native/docs
Aaron Connolly 67b138e77c Added a small note about an issue I ran into vending a simple `UIView?
Summary:?` instance to React Native. The layout system suppressed the values for `frame` and `backgroundColor` on my simple view and it wasn't clear why. After some debugging and hacking it became apparent that React Native needed to adjust those properties during layout. The workaround I found was to wrap my custom `UIView` in another `UIView` instance.

**Motivation**

When attempting to bridge a simple 100x100 red background `UIView` to ReactNative I could not get the view to show up as a `RCTView`. The view was there, but it was not 100x100 and it didn't have a red background. After a couple hours of poking around and debugging the call stacks on `setBackgroundColor` and `setFrame` it became apparent that React Native calls those messages on your `UIView` and sends new values. This is likely because of the layout system React Native uses.

I was encouraged to provide a small comment in the documentation if I thought others might find it useful. This PR is an attempt to provide a note in the documentation
Closes https://github.com/facebook/react-native/pull/6786

Differential Revision: D3133093

fb-gh-sync-id: 77d895f2f8e09978d283ee9e3193ee68cc5a7cb8
fbshipit-source-id: 77d895f2f8e09978d283ee9e3193ee68cc5a7cb8
2016-04-04 04:36:19 -07:00
..
Accessibility.md nit: Fixed extra space before > in Accessibility documentation 2016-03-14 08:02:24 -07:00
AndroidBuildingFromSource.md Add download links for Android NDK to the docs 2016-03-26 10:44:18 -07:00
AndroidUIPerformance.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
Animations.md Updated animation documentation to enable LayoutAnimation in Android. 2016-03-16 05:22:26 -07:00
Colors.md Add support for number as colors 2016-02-08 04:04:38 -08:00
CommunicationIOS.md fix es6 class method 2016-02-15 14:55:36 -08:00
Debugging.md Update Debugging.md 2016-03-17 08:29:25 -07:00
DevelopmentSetupAndroid.md Updated the Android Setup with correct SDK package to install. 2016-03-06 17:28:22 -08:00
DirectManipulation.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
EmbeddedAppAndroid.md Update EmbeddedAppAndroid.md 2016-03-24 07:11:30 -07:00
EmbeddedAppIOS.md Sample code closer to tutorial 2016-04-01 07:13:20 -07:00
GestureResponderSystem.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
GettingStarted.md update GettingStarted.md for new iOS run 2016-03-23 10:35:40 -07:00
GettingStartedOnLinux.md Fixed permalink 2016-03-06 11:13:26 -08:00
Images.md Add note about adding new images 2016-03-06 02:07:23 -08:00
IssueGuidelines.md Update PR and issue guidelines 2016-03-15 11:49:28 -07:00
JavaScriptEnvironment.md fix markdown format problem 2016-02-08 08:55:30 -08:00
KnownIssues.md Update KnownIssues 2016-03-20 17:27:26 -07:00
LinkingLibraries.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
LinuxWindowsSupport.md Link to 'LinuxWindowsSupport.md' at the appropriate commit. 2016-03-08 06:44:42 -08:00
MoviesExample.json Fix typo and add comments to the example app 2015-03-27 20:44:20 +00:00
NativeComponentsAndroid.md Fix broken link 2016-03-02 04:36:33 -08:00
NativeComponentsIOS.md Added a small note about an issue I ran into vending a simple `UIView? 2016-04-04 04:36:19 -07:00
NativeModulesAndroid.md Improve Android native module doc 2016-04-01 10:08:19 -07:00
NativeModulesIOS.md Added objective-c class/module semantics 2016-03-08 07:07:27 -08:00
NavigatorComparison.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
Network.md Removed Parse reference since its service is shutting down 2016-03-07 16:46:04 -08:00
Newsletter.md Introduce blog 2016-03-24 14:11:30 -07:00
Performance.md LayoutAnimation now works on android 2016-03-06 09:22:25 -08:00
PixelRatio.md Move around the docs a bit 2015-03-25 11:52:29 -07:00
PlatformSpecificInformation.md Fix Platform.Version documentation 2016-02-24 06:21:34 -08:00
PullRequestGuidelines.md Tweak commands and guidelines 2016-03-20 13:14:25 -07:00
RunningOnDeviceAndroid.md Adds alternative method of opening the dev menu using `adb shell input keyevent 82` 2016-01-06 21:28:16 -05:00
RunningOnDeviceIOS.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
SignedAPKAndroid.md "loosing"→"losing" (typo) 2016-03-03 09:30:36 -08:00
Style.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
Testing.md Fix typo in Testing.md 2015-12-11 15:22:57 +01:00
Text.md Replace "Bad: will fatal" with "Bad: will fail" in Text.md 2016-03-05 13:23:23 -08:00
Timers.md Add timer usage for es6 2016-03-26 05:42:26 -07:00
Troubleshooting.md replace require with es6 import in docs 2016-02-14 15:03:34 -08:00
Tutorial.md Minor improvements to Android docs 2016-02-23 09:01:31 -08:00
Upgrading.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
Videos.md Introduce blog 2016-03-24 14:11:30 -07:00