Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rootView.backgroundColor in AppDelegate.m is no longer white by default in 0.58.3 #23314

Closed
kdenz opened this issue Feb 6, 2019 · 1 comment
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@kdenz
Copy link

kdenz commented Feb 6, 2019

Environment

React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
      Memory: 1.20 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.14.2 - ~/.nvm/versions/node/v10.14.2/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.6.0 - ~/.nvm/versions/node/v10.14.2/bin/npm
      Watchman: 4.7.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 20, 22, 23, 24, 26, 27
        Build Tools: 23.0.1, 23.0.3, 24.0.0, 26.0.0, 26.0.1, 27.0.3
        System Images: android-22 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.1 AI-173.4720617
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: ^0.58.3 => 0.58.3 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

I'm not sure if this is regression.
Previously it's
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
Which is white

And now it becomes rootView.backgroundColor = [UIColor blackColor];
Which makes it black, and this has broken stuff like
storybookjs/storybook#5377

I had to change
rootView.backgroundColor = [UIColor blackColor]; to
rootView.backgroundColor = [UIColor whiteColor]; in order to revert to the old behavior

Reproducible Demo

Simply initialize an app under 0.58.3 and you'll see default backgrounds becoming black instead of white
For me I upgraded from 0.57.x to 0.58.3 using react-native-git-upgrade

@kdenz kdenz changed the title rootView.backgroundColor in AppDelegate.m is no longer white by default rootView.backgroundColor in AppDelegate.m is no longer white by default in 0.58.3 Feb 6, 2019
@kelset kelset added Platform: iOS iOS applications. and removed Bug Report labels Feb 6, 2019
@kelset
Copy link
Contributor

kelset commented Feb 6, 2019

I had to change
rootView.backgroundColor = [UIColor blackColor]; to
rootView.backgroundColor = [UIColor whiteColor]; in order to revert to the old behavior

Can you maybe submit a PR that reintroduces this?

That way we'd have a change to see why it was changed in the first place. Or maybe look at the git history to see which commit changed it?

@hramos hramos removed the Bug Report label Feb 6, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Feb 11, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants