diff --git a/lib/ios/RCTHelpers.m b/lib/ios/RCTHelpers.m index faf1578fa7b..8bffed8127a 100644 --- a/lib/ios/RCTHelpers.m +++ b/lib/ios/RCTHelpers.m @@ -167,7 +167,7 @@ + (BOOL)removeYellowBox:(RCTRootView *)reactRootView { [view.backgroundColor getRed:&r green:&g blue:&b alpha:&a]; //identify the yellow view by its hard-coded color and height - if((lrint(r * 255) == 250) && (lrint(g * 255) == 186) && (lrint(b * 255) == 48) && (lrint(a * 100) == 95) && (view.frame.size.height == 46)) + if((lrint(r * 255) == 250) && (lrint(g * 255) == 186) && (lrint(b * 255) == 48) && (lrint(a * 100) == 95) && (view.frame.size.height == 48)) { UIView *yelloboxParentView = view; while (view.superview != nil) diff --git a/lib/ios/RNNReactView.m b/lib/ios/RNNReactView.m index 19b36d6637f..c94451d7a2a 100644 --- a/lib/ios/RNNReactView.m +++ b/lib/ios/RNNReactView.m @@ -14,13 +14,14 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge moduleName:(NSString *)module return self; } +- (void)layoutSubviews { + [super layoutSubviews]; + #ifdef DEBUG + [RCTHelpers removeYellowBox:self]; + #endif +} + - (void)contentDidAppear:(NSNotification *)notification { -#ifdef DEBUG - if ([((RNNReactView *)notification.object).moduleName isEqualToString:self.moduleName]) { - [RCTHelpers removeYellowBox:self]; - } -#endif - RNNReactView* appearedView = notification.object; if (_reactViewReadyBlock && [appearedView.appProperties[@"componentId"] isEqual:self.componentId]) {