Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions lib/ios/RNNReactView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,17 @@ - (instancetype)initWithHost:(RCTHost *)host
- (void)surface:(__unused RCTSurface *)surface didChangeStage:(RCTSurfaceStage)stage {
RCTExecuteOnMainQueue(^{
[super surface:surface didChangeStage:stage];
[self reactViewReady];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(contentDidAppear:)
name:RCTContentDidAppearNotification
object:nil];
});
}

- (void)contentDidAppear:(NSNotification *)notification {
[self reactViewReady];
}

#else

- (void)contentDidAppear:(NSNotification *)notification {
Expand All @@ -96,9 +104,9 @@ - (void)reactViewReady {
_reactViewReadyBlock();
_reactViewReadyBlock = nil;
}
#ifndef RCT_NEW_ARCH_ENABLED

[[NSNotificationCenter defaultCenter] removeObserver:self];
#endif

}

#pragma mark - RNNComponentProtocol
Expand Down