react-native-router-flux: navigationBarTitleImage prop doesn't show image
Version
Tell us which versions you are using:
- react-native-router-flux v3.38.0
- react-native v0.4.1
Expected behaviour
Nav bar header should show the image included.
Actual behaviour
Image included doesn’t show.
Steps to reproduce
<Scene key="login" component={LoginForm} sceneStyle={{ paddingTop: 0 }} panHandlers={null} // disables swiping back navigationBarTitleImage={require('../assets/images/navbar-logo.png')} /> </Scene>
I will add that this is the first time I’m trying to use navigationBarTitleImage.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 18 (5 by maintainers)
Hi @omerdn1! Thanks for your response.
I just tried using master but then
react-native start
started giving this error:Any idea on how to solve it?
Regards
Hi, thank you for this awesome module!
I also have the same issue:
Just noticed I wasn’t using the latest (master) build. Anyways, for best styling you have to change titleWrapperStyle, navigationBarStyle, and navigationBarTitleImageStyle defaults. titleWrapperStyle:
marginTop: 0, position: 'relative', top: 0
navigationBarStyle:justifyContent: 'center', alignItems: 'center'
navigationBarTitleImageStyle:resizeMode: 'contain'
and of course include width, heightThe problem with this approach though is that everytime you do
npm i
to install a new dep thatnode_modules
will come back.@m-revetria I did it. The problem comes when you install from a git repository. If you just delete the folder node_modules from react-native-router-flux inside your project’s node_modules, it will be ok. Let us know if it works.