Selaa lähdekoodia

Switch to RCTJavaScriptWillStartLoadingNotification (#803)

fixes #800 #797
Guy Carmeli 7 vuotta sitten
vanhempi
commit
687b80ba55
3 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 1
    1
      ios/RCCLightBox.m
  2. 1
    1
      ios/RCCNotification.m
  3. 1
    1
      ios/RCCViewController.m

+ 1
- 1
ios/RCCLightBox.m Näytä tiedosto

@@ -65,7 +65,7 @@ const NSInteger kLightBoxTag = 0x101010;
65 65
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"frame" options:0 context:nil];
66 66
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"bounds" options:0 context:NULL];
67 67
         
68
-//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
68
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTJavaScriptWillStartLoadingNotification object:nil];
69 69
     }
70 70
     return self;
71 71
 }

+ 1
- 1
ios/RCCNotification.m Näytä tiedosto

@@ -32,7 +32,7 @@
32 32
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"frame" options:0 context:nil];
33 33
         [self.reactView.contentView.layer addObserver:self forKeyPath:@"bounds" options:0 context:NULL];
34 34
         
35
-//        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
35
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTJavaScriptWillStartLoadingNotification object:nil];
36 36
         
37 37
         if ([params[@"dismissWithSwipe"] boolValue])
38 38
         {

+ 1
- 1
ios/RCCViewController.m Näytä tiedosto

@@ -145,7 +145,7 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
145 145
     
146 146
     [self setStyleOnInit];
147 147
     
148
-//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTReloadNotification object:nil];
148
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onRNReload) name:RCTJavaScriptWillStartLoadingNotification object:nil];
149 149
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onCancelReactTouches) name:RCCViewControllerCancelReactTouchesNotification object:nil];
150 150
     
151 151
     // In order to support 3rd party native ViewControllers, we support passing a class name as a prop mamed `ExternalNativeScreenClass`