简体   繁体   English

在本机中访问堆栈页面时,导航图标正在消失

[英]Navigation icons are disappearing when accessing stack pages in react native

I am using react navigation ( https://reactnavigation.org/ ) to display icons for the bottom navigation tabs. 我正在使用反应导航( https://reactnavigation.org/ )来显示底部导航选项卡的图标。 Icons are displaying fine, however, when I enter into pages in the stack, the icons disappear. 图标显示正常,但是当我进入堆栈中的页面时,图标会消失。

I can get the icons to show by referring to the icon image on each page individually, but I am wondering if there is a better way to do this. 我可以通过单独参考每个页面上的图标图像来显示图标,但我想知道是否有更好的方法来执行此操作。 Thanks. 谢谢。

    static navigationOptions = {
    tabBarIcon: () => (
      <Image
        source={require('../../assets/profile.png')}
        style={styles.icon}
      />
      )
    }

In my case my cell phone time was not correct. 就我而言,我的手机时间不正确。 As soon as I made my cell phone same as my computer time my issue was fixed. 一旦我的手机与我的电脑时间相同,我的问题就得到了解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM