mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
pass flexiblity to shadowrootview on its creation
Reviewed By: javache Differential Revision: D3177404 fb-gh-sync-id: 2116628461e37e9f1d1b3cbc6d6560675cadee7e fbshipit-source-id: 2116628461e37e9f1d1b3cbc6d6560675cadee7e
This commit is contained in:
committed by
Facebook Github Bot 1
parent
5cdfe0f4b1
commit
eff673572e
@@ -13,6 +13,7 @@
|
||||
#import "RCTBridgeModule.h"
|
||||
#import "RCTInvalidating.h"
|
||||
#import "RCTViewManager.h"
|
||||
#import "RCTRootView.h"
|
||||
|
||||
/**
|
||||
* Posted right before re-render happens. This is a chance for views to invalidate their state so
|
||||
@@ -47,7 +48,7 @@ RCT_EXTERN NSString *const RCTUIManagerRootViewKey;
|
||||
/**
|
||||
* Register a root view with the RCTUIManager.
|
||||
*/
|
||||
- (void)registerRootView:(UIView *)rootView;
|
||||
- (void)registerRootView:(UIView *)rootView withSizeFlexibility:(RCTRootViewSizeFlexibility)sizeFlexibility;
|
||||
|
||||
/**
|
||||
* Gets the view associated with a reactTag.
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#import "RCTModuleData.h"
|
||||
#import "RCTModuleMethod.h"
|
||||
#import "RCTProfile.h"
|
||||
#import "RCTRootView.h"
|
||||
#import "RCTRootShadowView.h"
|
||||
#import "RCTRootViewInternal.h"
|
||||
#import "RCTScrollableProtocol.h"
|
||||
@@ -336,7 +335,7 @@ RCT_EXPORT_MODULE()
|
||||
return _shadowQueue;
|
||||
}
|
||||
|
||||
- (void)registerRootView:(UIView *)rootView
|
||||
- (void)registerRootView:(UIView *)rootView withSizeFlexibility:(RCTRootViewSizeFlexibility)sizeFlexibility
|
||||
{
|
||||
RCTAssertMainThread();
|
||||
|
||||
@@ -364,6 +363,7 @@ RCT_EXPORT_MODULE()
|
||||
shadowView.frame = frame;
|
||||
shadowView.backgroundColor = rootView.backgroundColor;
|
||||
shadowView.viewName = NSStringFromClass([rootView class]);
|
||||
shadowView.sizeFlexibility = sizeFlexibility;
|
||||
strongSelf->_shadowViewRegistry[shadowView.reactTag] = shadowView;
|
||||
[strongSelf->_rootViewTags addObject:reactTag];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user