Skip to content

Commit 2ba03af

Browse files
committed
Fix center issue on iOS
1 parent f2b93ae commit 2ba03af

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/NavBarContent.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { StyleSheet, Text, View, Animated, Easing, PropTypes } from 'react-native';
1+
import React, { StyleSheet, Text, View, Animated, Easing, PropTypes, Platform } from 'react-native';
22
import NavButton from './NavButton';
33
import * as Styles from '../styles';
44

@@ -143,7 +143,7 @@ class NavBarContent extends React.Component {
143143
);
144144
}
145145

146-
if (this.props.route.leftCorner || this.props.route.index > 0) {
146+
if (Platform.OS === 'ios' || this.props.route.leftCorner || this.props.route.index > 0) {
147147
leftCorner = (
148148
<View style={[this.styles.corner, this.styles.alignLeft]}>
149149
{leftCornerContent}
@@ -165,7 +165,9 @@ class NavBarContent extends React.Component {
165165
{...this.props.route.rightCornerProps}
166166
/>
167167
);
168+
}
168169

170+
if (Platform.OS === 'ios' || this.props.route.rightCorner || this.props.rightCorner) {
169171
rightCorner = (
170172
<View style={[this.styles.corner, this.styles.alignRight]}>
171173
{rightCornerContent}

0 commit comments

Comments
 (0)