Skip to content

Commit e0655d1

Browse files
author
Brent Vatne
committed
Hacky fix for navigation hidden
1 parent f7dbd23 commit e0655d1

File tree

8 files changed

+49
-11
lines changed

8 files changed

+49
-11
lines changed

App/Components/Menu.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class Menu extends React.Component{
2121
leftButtonTitle: 'Back',
2222
onLeftButtonPress: () => {
2323
this.props.navigator.pop();
24-
this.props.toggleNavigation();
24+
var self = this;
2525
},
26-
passProps: { navigator: this.props.navigator }
26+
passProps: { navigator: this.props.navigator, toggleNavigation: this.props.toggleNavigation }
2727
})
2828
}
2929
navigateToSettings() {
@@ -39,7 +39,7 @@ class Menu extends React.Component{
3939
this.props.navigator.pop();
4040
this.props.toggleNavigation();
4141
},
42-
passProps: { navigator: this.props.navigator }
42+
passProps: { navigator: this.props.navigator, toggleNavigation: this.props.toggleNavigation }
4343
})
4444
}
4545
render() {
@@ -84,4 +84,4 @@ var styles = StyleSheet.create({
8484
},
8585
});
8686

87-
module.exports = Menu;
87+
module.exports = Menu;

App/Screens/Themes.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ class Themes extends React.Component{
2727
var styles = StyleSheet.create({
2828
container: {
2929
flex: 1,
30-
backgroundColor: 'white'
30+
backgroundColor: 'white',
31+
paddingTop: 60
3132
}
3233
})
3334

34-
module.exports = Themes;
35+
module.exports = Themes;

index.ios.js

+11-5
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,34 @@ class ReactNativeBug extends React.Component{
1313
constructor(props) {
1414
super(props);
1515
this.state = {
16-
hideNavbar: true
16+
hideNavbar: false
1717
};
1818
}
19+
1920
componentWillMount() {
2021
StatusBarIOS.setHidden(true);
2122
}
23+
2224
shouldComponentUpdate(nextProps, nextState) {
2325
console.log(this.state, nextState); // Object {hideNavbar: true} Object {hideNavbar: false}
2426
return true;
2527
}
28+
2629
toggleNavigation() {
30+
console.log('clicked');
31+
2732
this.setState({
2833
hideNavbar: !this.state.hideNavbar
2934
});
3035
}
36+
3137
render() {
32-
var initialRoute = {
33-
component: ScreenWithMenu,
34-
title: 'Screen',
38+
var initialRoute = {
39+
component: ScreenWithMenu,
40+
title: 'Screen',
3541
passProps: {
3642
toggleNavigation: this.toggleNavigation.bind(this)
37-
}
43+
}
3844
};
3945

4046
return (

node_modules/react-native/Libraries/Components/Navigation/NavigatorIOS.ios.js

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/react-native/React/Views/RCTNavItem.h

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/react-native/React/Views/RCTNavItem.m

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/react-native/React/Views/RCTWrapperViewController.h

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/react-native/React/Views/RCTWrapperViewController.m

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)