Skip to content

Commit

Permalink
Hacky fix for navigation hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Vatne committed May 28, 2015
1 parent f7dbd23 commit e0655d1
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 11 deletions.
8 changes: 4 additions & 4 deletions App/Components/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class Menu extends React.Component{
leftButtonTitle: 'Back',
onLeftButtonPress: () => {
this.props.navigator.pop();
this.props.toggleNavigation();
var self = this;
},
passProps: { navigator: this.props.navigator }
passProps: { navigator: this.props.navigator, toggleNavigation: this.props.toggleNavigation }
})
}
navigateToSettings() {
Expand All @@ -39,7 +39,7 @@ class Menu extends React.Component{
this.props.navigator.pop();
this.props.toggleNavigation();
},
passProps: { navigator: this.props.navigator }
passProps: { navigator: this.props.navigator, toggleNavigation: this.props.toggleNavigation }
})
}
render() {
Expand Down Expand Up @@ -84,4 +84,4 @@ var styles = StyleSheet.create({
},
});

module.exports = Menu;
module.exports = Menu;
5 changes: 3 additions & 2 deletions App/Screens/Themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ class Themes extends React.Component{
var styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white'
backgroundColor: 'white',
paddingTop: 60
}
})

module.exports = Themes;
module.exports = Themes;
16 changes: 11 additions & 5 deletions index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,34 @@ class ReactNativeBug extends React.Component{
constructor(props) {
super(props);
this.state = {
hideNavbar: true
hideNavbar: false
};
}

componentWillMount() {
StatusBarIOS.setHidden(true);
}

shouldComponentUpdate(nextProps, nextState) {
console.log(this.state, nextState); // Object {hideNavbar: true} Object {hideNavbar: false}
return true;
}

toggleNavigation() {
console.log('clicked');

this.setState({
hideNavbar: !this.state.hideNavbar
});
}

render() {
var initialRoute = {
component: ScreenWithMenu,
title: 'Screen',
var initialRoute = {
component: ScreenWithMenu,
title: 'Screen',
passProps: {
toggleNavigation: this.toggleNavigation.bind(this)
}
}
};

return (
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions node_modules/react-native/React/Views/RCTNavItem.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions node_modules/react-native/React/Views/RCTNavItem.m

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e0655d1

Please sign in to comment.