我想显示图像,以及在导航栏冠军,但与下面的代码,我只能实现一次一个。
下面的代码显示只是图像和汉堡包图标
<Drawer
hideNavBar
key="drawerMenu"
contentComponent={SideMenu}
drawerWidth={250}
drawerPosition="left">
<Scene key="dashboard"
component={Home}
navigationBarTitleImage = {require('./images/logo.jpeg')}
navigationBarTitleImageStyle = {{width:30, height:30}}
title={"Dashboard"}/>
</Drawer>
现在,当我注释掉navigationBarTitleImage
不仅仅是标题变得可见,校验码及以下输出
<Drawer
hideNavBar
key="drawerMenu"
contentComponent={SideMenu}
drawerWidth={250}
drawerPosition="left">
<Scene key="dashboard"
component={Home}
//navigationBarTitleImage = {require('./images/logo.jpeg')}
//navigationBarTitleImageStyle = {{width:30, height:30}}
title={"Dashboard"}/>
</Drawer>
我想在总共三件事情:抽屉图标,自定义图标以及标题。谁能告诉我什么是错我的代码?
只需使用navBar
属性。它可以让你呈现你想要的任何东西。
见docs