美文网首页
react-native-navigation bugs

react-native-navigation bugs

作者: Zihao_Wong | 来源:发表于2018-08-28 18:04 被阅读0次

react-native version: 0.51.0
react-native-navigation:1.1.468

1. Android端 disableOpenGesture 失效:

Navigation.startTabBasedApp({
      appStyle: AppSetting.appStyle,
      tabs,
      tabsStyle: AppSetting.tabsStyle,
      animationType: 'fade',
      drawer: {
        disableOpenGesture: true, //Android 端失效
        right: {
          screen: 'trade.DrawerTrade'
        }
      }
    });
  }

        iOS 设置 disableOpenGesture: true后,侧边栏无法通过手势滑出,只能通过调用function的方式弹出,但Android设置后依然可以通过手势操作滑出侧边栏。
        经过查阅此为react-native-navigation的bug(github issue),issue中指出this.props.navigator.setDrawerEnabled方法可在Android端生效。
       尝试后发现新问题,在disableOpenGesture: true 并且通过setDrawerEnabled设置的情况下,android端正常(不可通过手势弹出侧边栏,可以通过调用function弹出侧边栏)iOS异常(无法通过任何一种方式弹出侧边栏)。
解决方案:

   if (Platform.OS !== 'ios') {
      this.props.navigator.setDrawerEnabled({ 
        side: 'right',  
        enabled: false
      });
    }

相关文章

  • react-native-navigation bugs

    react-native version: 0.51.0react-native-navigation:1.1.4...

  • Hungry sausage-Eating insects

    Sausages like to eat bugs. If there are bugs flying over ...

  • GMAIL SPDY V3 header decompress

    Wireshark · Wireshark-bugs: [Wireshark-bugs] [Bug 10528] ...

  • Bugs

    1. Server Tomcat v9.0 Server at localhost failed to start...

  • Bugs

    【日期】:2004-08-17 【问题】:当解码 Q.931 信令时无限循环 【原因】:当在Q.931信令中发现一...

  • [Bugs]

    [杂项][BUG]python 中debug出现ImportError: cannot import name c...

  • React Native使用react-native-navig

    目的 实现react-native-navigation中header title的动态改变。 方法 通过reac...

  • find-sec-bugs

    简介 find-sec-bugs 即 Find Security Bugs,是SpotBugs的一款插件,用于Ja...

  • Bugs inside

    真实意识到自己的嫉妒之心,仅仅因为很多人帮她点赞我便开始去比较记恨起一些人了。 她们更喜欢她,也更信任她,这也许是...

  • python bugs

    操作mysql数据库报错Incorrect string value Django之TIME_ZONE初探 关于P...

网友评论

      本文标题:react-native-navigation bugs

      本文链接:https://www.haomeiwen.com/subject/ntpqwftx.html