Open mtnt opened 4 years ago
FYI: When a title set to a child component options, it works well.
@mtnt We may be experiencing the same issue.
Can you please try the following and let me know if it works for you?
1) Go to:
https://github.com/wix/react-native-navigation/blob/master/lib/ios/TopBarTitlePresenter.m#L21 which for you should be in node_modules/react-native-navigation/lib/ios/TopBarTitlePresenter.m
and replace
if (options.subtitle.text.hasValue) {
with
if (options.subtitle.text.hasValue || options.title.text.hasValue) {
2) Set the following into your topBar
topBar: {
visible: true,
title: { text: 'sample title' },
background: {
color: '#00000000' // We need this otherwise the topBar title get's hidden behind a background view
}
},
and see if that makes your title visible.
I think this is a bug, but I'm still trying to figure it out.
Ok I managed to steadily reproduce this one and opened another ticket with a reproducible example: https://github.com/wix/react-native-navigation/issues/7001
Issue Description
I have the following structure: root -> stack -> component(single); There is a text title for the stack and it`s invisible. (I tried a component also and its constructor wasn`t called) But if I use static options inside the component (single child of the stack) the title is shown.
Steps to Reproduce / Code Snippets / Screenshots
Environment