t4t5 / react-native-router

Awesome navigation for your React Native app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change opacity of header as finger moves

t4t5 opened this issue · comments

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 (

aaa

);
},
_toSearchPage: function(){
this.props.toRoute({
name: "To Search Page",
component: SearchPage
}
);
}
});

var MyApp = React.createClass({
render:function() {
return (

)
}
});
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.