美文网首页
底部导航栏属性解析

底部导航栏属性解析

作者: 废材helloword | 来源:发表于2018-11-11 23:48 被阅读8次

const BottomNav = createBottomTabNavigator(

  {

    Shouye: {

      screen: Shouye,

      navigationOptions: {

        title: "首页",

//自定义图片

        tabBarIcon: ({ focused, tintColor }) => {

          return (

            <Image

              style={{ width: 30, height: 30 }}

              source={require("./ima/cc.png")}

            />

          );

        }

      }

    },

    TopNav: {

      screen: TopNav,

      navigationOptions: {

        title: "首页",

        tabBarIcon: ({ focused, tintColor }) => {

          return (

            <Image

              style={{ width: 30, height: 30 }}

              source={require("./ima/bb.png")}

            />

          );

        }

      }

    },

    Wode: {

      screen: Wode,

      navigationOptions: {

        title: "首页",

        tabBarIcon: ({ focused, tintColor }) => {

          return (

            <Image

              style={{ width: 30, height: 30 }}

              source={require("./ima/a.png")}

            />

          );

        }

      }

    }

  },

//按下状态

  {

    tabBarOptions: {

      activeTintColor: "#0000FF",

      inactiveTintColor: "gray",

      activeBackgroundColor: "#00FF00",

      inactiveBackgroundColor: "#FF0000"

    }

  }

);

export default BottomNav;

相关文章

网友评论

      本文标题:底部导航栏属性解析

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