react-native-navigation 8.7.0 → 8.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,17 +5,39 @@
5
5
 
6
6
  - (void)attach:(RNNBottomTabsController *)bottomTabsController {
7
7
  dispatch_group_t ready = dispatch_group_create();
8
-
8
+
9
+ UIWindow *preloadWindow = [[UIWindow alloc] initWithFrame:CGRectZero];
10
+ preloadWindow.hidden = NO;
11
+
12
+ NSMapTable *reactViewToParent = [NSMapTable strongToStrongObjectsMapTable];
13
+
9
14
  for (UIViewController *vc in bottomTabsController.childViewControllers) {
10
15
  dispatch_group_enter(ready);
11
16
  [vc setReactViewReadyCallback:^{
12
- dispatch_group_leave(ready);
17
+ dispatch_group_leave(ready);
13
18
  }];
19
+
14
20
  [vc render];
21
+
22
+ if ([vc isKindOfClass:[UINavigationController class]]) {
23
+ UIView *containerView = [(UINavigationController *)vc topViewController].view;
24
+ UIView *reactView = containerView.subviews.firstObject;
25
+
26
+ if (reactView && !reactView.window) {
27
+ [reactViewToParent setObject:containerView forKey:reactView];
28
+ [preloadWindow addSubview:reactView];
29
+ }
30
+ }
15
31
  }
16
-
32
+
17
33
  dispatch_notify(ready, dispatch_get_main_queue(), ^{
18
- [bottomTabsController readyForPresentation];
34
+ for (UIView *reactView in reactViewToParent) {
35
+ UIView *parent = [reactViewToParent objectForKey:reactView];
36
+ reactView.frame = parent.bounds;
37
+ [parent addSubview:reactView];
38
+ }
39
+ preloadWindow.hidden = YES; //Keep preloadWindow reference alive to this point
40
+ [bottomTabsController readyForPresentation];
19
41
  });
20
42
  }
21
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "8.7.0",
3
+ "version": "8.7.2",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,