Change opacity of header as finger moves
Right now, the navigation bar only updates after the user releases their touch. If anyone has a nice implementation for changing the navigation bar's opacity based on the user's finger position (as many well-designed apps do), feel free to leave a comment or make a pull request!
I'm new to RN and react-native-router . How can I use routes in titleCompoent ? my code is something like this,it will cause an error :"this.props.toRoute is not a function" var TitleComp = React.createClass({ render:function(){ return ( <TouchableHighlight onPress={this.nextPage} underlayColor="transparent" onPress={this._toSearchPage}> <Text>aaa</Text> </TouchableHighlight> ); }, _toSearchPage: function(){ this.props.toRoute({ name: "To Search Page", component: SearchPage } ); } });
var MyApp = React.createClass({ render:function() { return ( <Router ref="myrouter" firstRoute={firstRoute} /> ) } }); var firstRoute = { name: 'Welcome!', titleComponent:TitleComp, component: SearchPage, };
AppRegistry.registerComponent('navProject', () => MyApp);
Still no one can do this issue?
I saw https://facebook.github.io/react-native/docs/navigator.html, it can do this, I'd like to see what happened.