浏览代码

external component view fix

yogevbd 7 年前
父节点
当前提交
8f8254a707
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1
    2
      lib/ios/RNNControllerFactory.m

+ 1
- 2
lib/ios/RNNControllerFactory.m 查看文件

114
 	RNNRootViewController* component = [[RNNRootViewController alloc] initWithName:name withOptions:options withComponentId:componentId rootViewCreator:_creator eventEmitter:_eventEmitter isExternalComponent:YES];
114
 	RNNRootViewController* component = [[RNNRootViewController alloc] initWithName:name withOptions:options withComponentId:componentId rootViewCreator:_creator eventEmitter:_eventEmitter isExternalComponent:YES];
115
 	
115
 	
116
 	[component addChildViewController:externalVC];
116
 	[component addChildViewController:externalVC];
117
-	component.view = [[UIView alloc] init];
118
-	component.view.backgroundColor = [UIColor whiteColor];
119
 	[component.view addSubview:externalVC.view];
117
 	[component.view addSubview:externalVC.view];
118
+	[externalVC didMoveToParentViewController:component];
120
 	
119
 	
121
 	return component;
120
 	return component;
122
 }
121
 }