【问题标题】:react-native-navigation: startTabBasedApp and switch to tabreact-native-navigation: startTabBasedApp 并切换到选项卡
【发布时间】:2018-06-11 06:19:21
【问题描述】:

我如何startTabBasedApp 使用具有焦点的特定标签。 默认情况下,它会打开第一个选项卡。但是当我 startTabBasedApp

时,我希望有条件地聚焦标签

【问题讨论】:

    标签: react-native react-native-navigation wix-react-native-navigation


    【解决方案1】:
    tabsStyle: { 
        initialTabIndex: 1, // optional, the default selected bottom tab. 
      }
    

    【讨论】:

      【解决方案2】:

      这是一个例子:

      Navigation.startTabBasedApp({
           tabs: [
              {
                  screen: "screen1",
                  icon: require("../sharedAssets/image.png"),
                  label: "label1",
              },
              {
                  screen: "screen2"
                  icon: require("../sharedAssets/image2.png"),
                  label: "label2",
              }
          ],
          tabsStyle: {
              initialTabIndex: 1, // optional, the default selected bottom tab. Default: 0
          }
      })
      

      【讨论】:

        猜你喜欢
        • 2022-01-09
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多