RCTUIManager's setFrame:forView: fix - add support for Modal

Reviewed By: javache

Differential Revision: D2585415

fb-gh-sync-id: f367cf5353593363357dd86ec959acb1676cba9b
This commit is contained in:
Pawel Sienkowski 2015-10-27 09:20:48 -07:00 committed by facebook-github-bot-7
parent 36ec4752a8
commit 6faface188
1 changed files with 9 additions and 3 deletions

View File

@ -348,9 +348,15 @@ extern NSString *RCTBridgeModuleNameForClass(Class cls);
{
RCTAssertMainThread();
// The following variables have no meaning if the view is not a react root view
RCTRootView *rootView = (RCTRootView *)[view superview];
RCTRootViewSizeFlexibility sizeFlexibility = rootView != nil ? rootView.sizeFlexibility : RCTRootViewSizeFlexibilityNone;
// The following variable has no meaning if the view is not a react root view
RCTRootViewSizeFlexibility sizeFlexibility = RCTRootViewSizeFlexibilityNone;
if (RCTIsReactRootView(view.reactTag)) {
RCTRootView *rootView = (RCTRootView *)[view superview];
if (rootView != nil) {
sizeFlexibility = rootView.sizeFlexibility;
}
}
NSNumber *reactTag = view.reactTag;
dispatch_async(_shadowQueue, ^{