您的位置:首页 > Web前端 > React

React Native-导航条设置

2016-12-11 23:17 295 查看

NavigatorIOS设置barTintColor后,颜色和实际颜色有差别

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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: