react-native-navigation 8.4.0 → 8.4.1
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,6 +5,15 @@
|
|
|
5
5
|
@implementation RNNSplashScreenViewController
|
|
6
6
|
|
|
7
7
|
+ (void)showOnWindow:(UIWindow *)window {
|
|
8
|
+
UIViewController *viewController = [self getSplashScreenVC];
|
|
9
|
+
if (viewController != nil) {
|
|
10
|
+
id<UIApplicationDelegate> appDelegate = [UIApplication sharedApplication].delegate;
|
|
11
|
+
appDelegate.window.rootViewController = viewController;
|
|
12
|
+
[appDelegate.window makeKeyAndVisible];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
+ (UIViewController*)getSplashScreenVC {
|
|
8
17
|
CGRect screenBounds = [UIScreen mainScreen].bounds;
|
|
9
18
|
CGFloat screenScale = [UIScreen mainScreen].scale;
|
|
10
19
|
UIViewController *viewController = nil;
|
|
@@ -82,11 +91,7 @@
|
|
|
82
91
|
}
|
|
83
92
|
}
|
|
84
93
|
|
|
85
|
-
|
|
86
|
-
id<UIApplicationDelegate> appDelegate = [UIApplication sharedApplication].delegate;
|
|
87
|
-
appDelegate.window.rootViewController = viewController;
|
|
88
|
-
[appDelegate.window makeKeyAndVisible];
|
|
89
|
-
}
|
|
94
|
+
return viewController;
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
- (UIStatusBarStyle)preferredStatusBarStyle {
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
#import "RNNReactRootViewCreator.h"
|
|
11
11
|
#import "RNNTurboCommandsHandler.h"
|
|
12
12
|
#import <React-RuntimeApple/ReactCommon/RCTHost.h>
|
|
13
|
+
#import "RNNSplashScreenViewController.h"
|
|
13
14
|
|
|
14
15
|
@interface RNNTurboManager ()
|
|
15
|
-
|
|
16
16
|
@property(nonatomic, strong, readwrite) RNNExternalComponentStore *store;
|
|
17
17
|
@property(nonatomic, strong, readwrite) RNNReactComponentRegistry *componentRegistry;
|
|
18
18
|
@property(nonatomic, strong, readonly) RNNLayoutManager *layoutManager;
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
@property(nonatomic, strong, readonly) RNNModalHostViewManagerHandler *modalHostViewHandler;
|
|
22
22
|
@property(nonatomic, strong, readonly) RNNCommandsHandler *commandsHandler;
|
|
23
23
|
@property(nonatomic, strong, readonly) RNNEventEmitter *eventEmitter;
|
|
24
|
-
|
|
25
24
|
@end
|
|
26
25
|
|
|
27
26
|
@implementation RNNTurboManager {
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
|
|
31
30
|
- (instancetype)initWithHost:(RCTHost *)host mainWindow:(UIWindow *)mainWindow {
|
|
32
31
|
if (self = [super init]) {
|
|
33
|
-
|
|
32
|
+
_host = host;
|
|
34
33
|
_mainWindow = mainWindow;
|
|
35
34
|
_overlayManager = [RNNOverlayManager new];
|
|
36
35
|
_store = [RNNExternalComponentStore new];
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
name:@"RCTInstanceDidLoadBundle"
|
|
41
40
|
object:nil];
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
// TODO: investigate which new event is fired
|
|
44
43
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
45
44
|
selector:@selector(onJavaScriptWillLoad)
|
|
46
45
|
name:RCTJavaScriptWillStartLoadingNotification
|
|
@@ -99,16 +98,16 @@
|
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
- (void)onJavaScriptLoaded {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
101
|
+
RCTExecuteOnMainQueue(^{
|
|
102
|
+
UIApplication.sharedApplication.delegate.window.rootViewController = [RNNSplashScreenViewController getSplashScreenVC];
|
|
103
|
+
|
|
104
|
+
[self->_commandsHandler setReadyToReceiveCommands:true];
|
|
105
|
+
// TODO: Refactor
|
|
106
|
+
// [_modalHostViewHandler
|
|
107
|
+
// connectModalHostViewManager:[[_host moduleRegistry] moduleForName:"RCTModalHostViewManager"]];
|
|
108
|
+
|
|
109
|
+
[self->_eventEmitter sendOnAppLaunched];
|
|
110
|
+
});
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
@end
|