React-native-screens: Header shadow appearance on iOS

Created on 1 Dec 2020  路  4Comments  路  Source: software-mansion/react-native-screens

Description

Hi, first, thanks to the maintainers of this nice library !

I just wanted to know if there was a way to set an appearance prop for the header shadow. The color changes automatically when phone is in dark or light theme. As I don't support dark theme in my app yet, the dark divider can appear almost transparent, I would like to know if there is some way to force the color divider to "light" ?

Ex:

"Light" mode

"Dark" mode

Of course I could juste changed the background color of my header but I think it would be nice to have a control on this !

Package versions

  • React: 16.13.1
  • React Native: 0.63.3
  • React Native Screens: 2.15.0

Most helpful comment

You can disable dark mode in your iOS app:

The system automatically opts in any app linked against the iOS 13.0 or later SDK to both light and dark appearances. If you need extra time to work on your app's Dark Mode support, you can temporarily opt out by including the UIUserInterfaceStyle key (with a value of Light) in your app鈥檚 Info.plist file. Setting this key to Light causes the system to ignore the user's preference and always apply a light appearance to your app.

https://developer.apple.com/documentation/xcode/supporting_dark_mode_in_your_interface/choosing_a_specific_interface_style_for_your_ios_app

All 4 comments

No, I would like something like a color setting !
I want the shadow to be shown, but I want to lock the color appearance to "light", because in the actual version, it seems it colors switch automatically when the color scheme of the phone changes 馃槙

You can disable dark mode in your iOS app:

The system automatically opts in any app linked against the iOS 13.0 or later SDK to both light and dark appearances. If you need extra time to work on your app's Dark Mode support, you can temporarily opt out by including the UIUserInterfaceStyle key (with a value of Light) in your app鈥檚 Info.plist file. Setting this key to Light causes the system to ignore the user's preference and always apply a light appearance to your app.

https://developer.apple.com/documentation/xcode/supporting_dark_mode_in_your_interface/choosing_a_specific_interface_style_for_your_ios_app

Perfect, I didn't know about that. I will use this solution and close the issue.

Thank you for your time 馃榾

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iDuuck picture iDuuck  路  5Comments

beetlebum picture beetlebum  路  5Comments

ukasiu picture ukasiu  路  4Comments

chengsokdara picture chengsokdara  路  3Comments

bartzy picture bartzy  路  3Comments