React-native-navigation: custom title image component not being shown on IOS but works on Android

Created on 19 Oct 2018  路  4Comments  路  Source: wix/react-native-navigation

Issue Description

custom Tobar->title (image component) not being shown on IOS but works on Android

Steps to Reproduce / Code Snippets / Screenshots

const Logo = ({ style }: any) => (
  <Image
    style={[styles.image, style]}
    resizeMode="contain"
    source={Theme.images.SplashLogo}
  />
);

const styles = StyleSheet.create({
  image: {
    flex: 1,
    alignSelf: "center"
  }
});

export default Logo;

then register it :

Navigation.registerComponent("Logo", () => Logo);

after that setDefaultOptions :

Navigation.setDefaultOptions({ topBar: { visible: true, animate: true, drawBehind: false, title: { component: { name: "Logo", alignment: "center" } } } });

it shows up on Android , but not on the IOS simulator

Environment

  • React Native Navigation version: ^2.0.2597
  • React Native version: 0.57.3
  • Platform(s) (iOS, Android, or both?): IOS
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator/Debug
iOS acceptebug

Most helpful comment

@yogevbd/@guyca

I'm having the same issue. Is it resolved permanently or not?

I'm using "react-native-navigation": "^2.18.4",

Could you please let me know how would we achieve this?

All 4 comments

Fixed here: aa4326d

@yogevbd
it's not being fixed , the issue still exist!

@yogevbd/@guyca

I'm having the same issue. Is it resolved permanently or not?

I'm using "react-native-navigation": "^2.18.4",

Could you please let me know how would we achieve this?

Still not solved. I think #5716 is related.

@guyca any solution?

Was this page helpful?
0 / 5 - 0 ratings