React Native-導航條設置

1.使用NavigatorIOS控件設置導航條顏色

<NavigatorIOS
        style = {BmacStyles.container}
        initialRoute={{
          component: MainPage,
          title: '',
          leftButtonTitle:'左邊按鈕',
          tintColor:'#ffffff',//白色 導航欄上按鈕的顏色。
          barTintColor:'rgb(30, 129, 210)',//導航欄,藍色
        }}
        >

        </NavigatorIOS>

效果如下
這裏寫圖片描述

2.增加一個屬性即可解決

        <NavigatorIOS
        style = {BmacStyles.container}
        initialRoute={{
          component: MainPage,
          title: '',
          leftButtonTitle:'左邊按鈕',
          tintColor:'#ffffff',//白色 導航欄上按鈕的顏色。
          barTintColor:'rgb(30, 129, 210)',//導航欄,藍色
          translucent: false,
        }}
        >

        </NavigatorIOS>
發佈了58 篇原創文章 · 獲贊 8 · 訪問量 6萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章