Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

[StackNavigator] Styles are not applied to iOS built-in Header #89

Open
knowbody opened this issue May 12, 2018 · 5 comments
Open

[StackNavigator] Styles are not applied to iOS built-in Header #89

knowbody opened this issue May 12, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@knowbody
Copy link
Contributor

It seems like the styles are not being applied to the built-in Header.

I tried something like this:

    <StackNavigator.Screen
      headerTitle="CustomTabBarExample"
      headerStyle=Style.(
                    style([elevation(0.), backgroundColor(String("#37bc9b"))])
                  )
      navigation=nav>
      /* ... */

this works on Android though, but while testing I also discovered I cannot change the title color. Is this something what I should be able to do or should I just provide my own center component?

@knowbody knowbody added the bug Something isn't working label May 12, 2018
@grabbou
Copy link
Contributor

grabbou commented May 15, 2018

Probably need to move it to a different container. Let me take a look.

@grabbou
Copy link
Contributor

grabbou commented May 17, 2018

Is this something what I should be able to do or should I just provide my own center component?

We can expose a tintColor property to make it possible to change the color of all the built-in components by default. Might be quite handy to tweak the appearance of the back button and others.

^ @satya164

@knowbody
Copy link
Contributor Author

I don't think @satya164 accepted the invitation to this project

@mciparelli
Copy link

I have several nested stack navigators. For most of them, since we cannot remove headers I'm hiding them via styles in Android. Unfortunately I get a stack of headers in iOS since there's apparently no current way to hide them. Does anyone know of a workaround to control when headers should appear in iOS?

@grabbou
Copy link
Contributor

grabbou commented May 24, 2018

That's an interesting use-case. I think it might be supported via custom headerComponent (provide something that renders empty View), but I am not sure if marginTop is not hardcoded.

We should definitely implement an easy way to use nested stack navigators and fix that thing on iOS.

Thanks for the report, we will look into that this week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants