Reputation: 1030
I'm trying to make the usual drawer navigator app by having the Menu icon/button at the top-left corner of the screen, I can get it to the header/top but can't get it to the left, it always get stuck in the middle somehow, here is what it looks like:
Here is the render code:
render() {
return (
<Container>
<Header>
<Left>
<Icon name='ios-menu' onPress={() =>
this.props.navigation.dispatch(DrawerActions.openDrawer())} />
</Left>
</Header>
<AppTabNavigator/>
</Container>
);
}
I've tried setting some stylesheet properties to alignSelf, anything to center it but could not manage to get it correctly.
Upvotes: 0
Views: 1230
Reputation: 469
I think you need to have empty Body and Right components inside the Header
Upvotes: 1