|
@@ -1,6 +1,5 @@
|
1
|
1
|
|
2
|
2
|
#import "RNNRootViewController.h"
|
3
|
|
-#import <React/RCTRootView.h>
|
4
|
3
|
|
5
|
4
|
@interface RNNRootViewController()
|
6
|
5
|
@property NSString* containerId;
|
|
@@ -17,19 +16,33 @@
|
17
|
16
|
self.eventEmitter = eventEmitter;
|
18
|
17
|
|
19
|
18
|
self.view = [creator createRootView:self.containerName rootViewId:self.containerId];
|
|
19
|
+
|
|
20
|
+// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onJsReload) name:RCTJavaScriptWillStartLoadingNotification object:nil];
|
|
21
|
+
|
20
|
22
|
return self;
|
21
|
23
|
}
|
22
|
24
|
|
23
|
|
--(void)viewDidAppear:(BOOL)animated
|
24
|
|
-{
|
|
25
|
+-(void)viewDidAppear:(BOOL)animated {
|
25
|
26
|
[super viewDidAppear:animated];
|
26
|
27
|
[self.eventEmitter sendContainerStart:self.containerId];
|
27
|
28
|
}
|
28
|
29
|
|
29
|
|
--(void)viewDidDisappear:(BOOL)animated
|
30
|
|
-{
|
|
30
|
+-(void)viewDidDisappear:(BOOL)animated {
|
31
|
31
|
[super viewDidDisappear:animated];
|
32
|
32
|
[self.eventEmitter sendContainerStop:self.containerId];
|
33
|
33
|
}
|
34
|
34
|
|
|
35
|
+///**
|
|
36
|
+// * fix for
|
|
37
|
+// */
|
|
38
|
+//-(void)onJsReload {
|
|
39
|
+// [[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
40
|
+// [[NSNotificationCenter defaultCenter] removeObserver:self.view];
|
|
41
|
+// self.view = nil;
|
|
42
|
+//}
|
|
43
|
+
|
|
44
|
+-(void)dealloc {
|
|
45
|
+
|
|
46
|
+}
|
|
47
|
+
|
35
|
48
|
@end
|