Skip to content

Commit cdd6151

Browse files
zhongwuzwfacebook-github-bot
authored andcommitted
Revert RCTRootView's backgroundColor to white (facebook#23358)
Summary: Fixes facebook#23314 , the change came from facebook#20945 , its purpose is to fix orientation change issue in HelloWord template, but I think it's just a trick, to make rootView's backgroundColor the same as window backgroundColor, the orientation issue seems related to [UIManager setAvailableSize:forRootView:](https://github.com/facebook/react-native/blob/d2fc19f4aa94888b7c3d3f4a5fb621bf96a1aff9/React/Modules/RCTUIManager.m#L343) async layout things. [iOS] [Fixed] - Revert RCTRootView's backgroundColor to white. Pull Request resolved: facebook#23358 Differential Revision: D14030666 Pulled By: cpojer fbshipit-source-id: 7c9a45f03b87c3be0f2b7c64a3c837c6ae14af3e
1 parent ae11993 commit cdd6151

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/ios/HelloWorld/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2020
moduleName:@"HelloWorld"
2121
initialProperties:nil];
2222

23-
rootView.backgroundColor = [UIColor blackColor];
23+
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
2424

2525
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
2626
UIViewController *rootViewController = [UIViewController new];

0 commit comments

Comments
 (0)