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

Table not visible in Dark Mode #215

Open
chetstone opened this issue May 20, 2020 · 5 comments
Open

Table not visible in Dark Mode #215

chetstone opened this issue May 20, 2020 · 5 comments

Comments

@chetstone
Copy link
Contributor

chetstone commented May 20, 2020

Using the (corrected) simple example from #214 (comment):

      <View style={{ flex: 1 }}>
        <TableView style={{ flex: 1 }} >
          <Section label="Section 1">
            <Item key={1}>Item 1</Item>
            <Item key={2}>Item 1</Item>
            <Item key={3}>Item 1</Item>
            <Item key={4}>Item 1</Item>
            <Item key={5}>Item 1</Item>
            <Item key={6}>Item 1</Item>
            <Item key={7}>Item 1</Item>
          </Section>
        </TableView>
      </View>

the items are not visible except for the section header and the separators as shown in the screenshot below. When you touch an item, it appears in dark (reverse) color, as shown in the second screenshot.

I tried adding the transparent prop to the <Item> as suggested in #210, but that has no effect.
image

image

@chetstone
Copy link
Contributor Author

UPDATE: I built the example app and the entire app is blank in Dark Mode. (In the Simulator, go to Settings/Developer and turn on Dark Appearance)

@chetstone
Copy link
Contributor Author

WORKAROUND:

From Apple's Document:
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’s 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.

This applies if you're building with Xcode 11. If you're building with Xcode 10, this is not necessary.

@iRoachie
Copy link
Collaborator

iRoachie commented Jan 4, 2021

@chetstone Do you have any idea of the kind of work needed to support dark mode?

@zachgibson
Copy link

Can you not write a custom cell and set your light/dark mode colors that way?

@chetstone
Copy link
Contributor Author

@chetstone Do you have any idea of the kind of work needed to support dark mode?

Sorry, I have no idea. Since discovering the workaround I described above, I have forgotten about this issue. The workaround is all I need for my app atm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants