|
@@ -43,6 +43,17 @@ RCT_EXPORT_METHOD(pop:(NSString*)containerId)
|
43
|
43
|
[[RNN instance].store removeContainer:containerId];
|
44
|
44
|
}
|
45
|
45
|
|
|
46
|
+RCT_EXPORT_METHOD(showModal:(NSDictionary*)layout)
|
|
47
|
+{
|
|
48
|
+ [self assertReady];
|
|
49
|
+ RNNControllerFactory *factory = [[RNNControllerFactory alloc] initWithRootViewCreator:[RNNReactRootViewCreator new] store:[RNN instance].store];
|
|
50
|
+ UIViewController *newVc = [factory createLayout:layout];
|
|
51
|
+
|
|
52
|
+ [UIApplication.sharedApplication.delegate.window.rootViewController presentViewController:newVc animated:YES completion:^{
|
|
53
|
+
|
|
54
|
+ }];
|
|
55
|
+}
|
|
56
|
+
|
46
|
57
|
- (void)assertReady
|
47
|
58
|
{
|
48
|
59
|
if (![RNN instance].isReadyToReceiveCommands) {
|