Skip to content

Commit 5f7efa0

Browse files
authored
fix (#8287)
1 parent 0c3a3de commit 5f7efa0

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

ios/BottomTabsAfterInitialTabAttacher.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ - (void)attach:(UITabBarController *)bottomTabsController {
99
for (UIViewController *viewController in bottomTabsController.deselectedViewControllers) {
1010
dispatch_async(dispatch_get_main_queue(), ^{
1111
UIWindow *preloadWindow = [[UIWindow alloc] initWithFrame:CGRectZero];
12+
// Clip the preload window so the deselected tab's full-screen reactView,
13+
// which is briefly hosted here while it renders, can't draw outside the
14+
// zero-frame window and flicker over the already-visible selected tab.
15+
preloadWindow.clipsToBounds = YES;
1216
preloadWindow.hidden = NO;
1317

1418
dispatch_group_t ready = dispatch_group_create();

ios/BottomTabsTogetherAttacher.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ - (void)attach:(RNNBottomTabsController *)bottomTabsController {
77
dispatch_group_t ready = dispatch_group_create();
88

99
UIWindow *preloadWindow = [[UIWindow alloc] initWithFrame:CGRectZero];
10+
// Clip the preload window so the full-screen reactViews hosted here while
11+
// they render can't draw outside the zero-frame window. Today the splash
12+
// screen masks this, but without clipping it's a latent flicker.
13+
preloadWindow.clipsToBounds = YES;
1014
preloadWindow.hidden = NO;
1115

1216
NSMapTable *reactViewToParent = [NSMapTable strongToStrongObjectsMapTable];

0 commit comments

Comments
 (0)