Skip to content

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

Closed
@kdenz

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions