File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,17 @@ - (instancetype)initWithHost:(RCTHost *)host
7878- (void )surface:(__unused RCTSurface *)surface didChangeStage:(RCTSurfaceStage)stage {
7979 RCTExecuteOnMainQueue (^{
8080 [super surface: surface didChangeStage: stage];
81- [self reactViewReady ];
81+ [[NSNotificationCenter defaultCenter ] addObserver: self
82+ selector: @selector (contentDidAppear: )
83+ name: RCTContentDidAppearNotification
84+ object: nil ];
8285 });
8386}
87+
88+ - (void )contentDidAppear:(NSNotification *)notification {
89+ [self reactViewReady ];
90+ }
91+
8492#else
8593
8694- (void )contentDidAppear:(NSNotification *)notification {
@@ -96,9 +104,9 @@ - (void)reactViewReady {
96104 _reactViewReadyBlock ();
97105 _reactViewReadyBlock = nil ;
98106 }
99- # ifndef RCT_NEW_ARCH_ENABLED
107+
100108 [[NSNotificationCenter defaultCenter ] removeObserver: self ];
101- # endif
109+
102110}
103111
104112#pragma mark - RNNComponentProtocol
You can’t perform that action at this time.
0 commit comments