react-native/React/Modules
Martin Kralik a86171a482 exposed a way to trigger layout on the uimanager
Summary:
A component can be backed by native "node" that can change its internal state, which would result in a new UI after the next layout. Since js has no way of knowing that this has happened it wouldn't trigger a layout if nothing in js world has changed. Therefore we need a way how to trigger layout from native code.

This diff does it by adding methods `layoutIfNeeded` on the uimanager and `isBatchActive` on the bridge.
When `layoutIfNeeded` is called it checks whether a batch is in progress. If it is we do nothing, since at it's end layout happens. If a batch is not in progress we immidiately do layout.

I went with the easiest way how to implement this - `isBatchActive` is a public method on the bridge. It's not ideal, but consistent with other methods for modules.
public

Reviewed By: jspahrsummers, nicklockwood

Differential Revision: D2748896

fb-gh-sync-id: f3664c4af980d40a463b538e069b26c9ebad6300
2015-12-11 06:59:30 -08:00
..
RCTAccessibilityManager.h Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTAccessibilityManager.m Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTAlertManager.h Remove an existing UIAlertViews when invalidating the RCTAlertManager 2015-09-18 08:45:27 -07:00
RCTAlertManager.m Add secure and login-password types to AlertIOS. 2015-11-30 19:51:41 -08:00
RCTAppState.h [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00
RCTAppState.m Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTAsyncLocalStorage.h Added lightweight generic annotations 2015-11-03 14:49:30 -08:00
RCTAsyncLocalStorage.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTClipboard.h add Clipboard component for ios and android 2015-12-09 10:04:21 -08:00
RCTClipboard.m add Clipboard component for ios and android 2015-12-09 10:04:21 -08:00
RCTDevLoadingView.h [RCTDevLoadingView] Add ability to disable during development. 2015-09-04 03:46:06 -08:00
RCTDevLoadingView.m Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTDevMenu.h Added toggle items to dev menu 2015-09-14 09:40:33 -07:00
RCTDevMenu.m Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTExceptionsManager.h Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTExceptionsManager.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTRedBox.h Added lightweight generic annotations 2015-11-03 14:49:30 -08:00
RCTRedBox.m Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTSourceCode.h Use JSStringCreateWithUTF8CString and skip NSString decoding when loading the bundle 2015-10-16 08:11:25 -07:00
RCTSourceCode.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTStatusBarManager.h Removed deprecated RCT_EXPORT + code paths 2015-06-05 09:58:25 -08:00
RCTStatusBarManager.m Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTTiming.h [ReactNative] Use a single DisplayLink held by the bridge 2015-04-15 07:07:48 -08:00
RCTTiming.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTUIManager.h exposed a way to trigger layout on the uimanager 2015-12-11 06:59:30 -08:00
RCTUIManager.m exposed a way to trigger layout on the uimanager 2015-12-11 06:59:30 -08:00