【发布时间】:2018-09-27 13:48:04
【问题描述】:
如何在 React Native 中从右侧滑动导航抽屉,我尝试了 position: right 但它不起作用
export default createDrawerNavigator({
Home:{
screen: AppStackNav,
navigationOptions: {
drawerIcon: ({tintColor}) => (
<Icon name = 'ios-home' style={{fontSize:24, color: tintColor}}/>
),
drawerLabel: "Home",
}},
Setting: {
screen: SettingScreen,
navigationOptions: {
drawerLabel: "Setting",
drawerIcon: ({tintColor}) => (
<Icon name = 'ios-settings' style={{fontSize:24, color: tintColor}}/>
)}},
{
contentComponent: CustomDrawerComponent
},{
drawerPosition: 'right',}
);
【问题讨论】:
-
为了给您一个很好的答案,如果您还没有看过How to Ask,它可能会对我们有所帮助。如果您可以提供minimal reproducible example,它可能也很有用。
标签: react-native navigation-drawer react-navigation