Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么修改页面切换的动画。。? #8

Open
chunmu opened this issue Oct 11, 2016 · 2 comments
Open

怎么修改页面切换的动画。。? #8

chunmu opened this issue Oct 11, 2016 · 2 comments

Comments

@chunmu
Copy link

chunmu commented Oct 11, 2016

//这段动画组织的代码   我不知道外层怎么输入动画配置信息。。?
configureScene(route) {
      if (route.query) {
        if (route.query.anim === 'floatFromBottom') {
          return Platform.OS === 'android' ?
            Navigator.SceneConfigs.FloatFromBottomAndroid : Navigator.SceneConfigs.FloatFromBottom;
        }

        if (Platform.OS === 'ios' && route.query.anim === 'floatFromLeft') {
          return Navigator.SceneConfigs.FloatFromLeft;
        }

        if (Platform.OS === 'ios' && route.query.anim === 'floatFromRight') {
          return Navigator.SceneConfigs.FloatFromRight;
        }

        if (Platform.OS === 'ios' && route.query.anim === 'pushFromRight') {
          return Navigator.SceneConfigs.PushFromRight;
        }
      }

      return Platform.OS === 'android' ?
        Navigator.SceneConfigs.FloatFromBottomAndroid : Navigator.SceneConfigs.FloatFromRight;
    }
@starlight36
Copy link
Owner

URL例如 /login,指定动画方式可以写作/login?anim=floatFromBottom,利用react-router进行参数传递的。

@chunmu
Copy link
Author

chunmu commented Oct 11, 2016

哦哦 ok 谢啦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants