react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

[v2] How to custom animation for push

Open tiennguyen9988 opened this issue 7 years ago • 8 comments

Issue Description

[v2] How to custom animation for Navigation.push method replace for slide left to right effect only ?

Steps to Reproduce / Code Snippets / Screenshots

[FILL THIS OUT]


Environment

  • React Native Navigation version: react-native-navigation
  • React Native version: 0.57.8
  • Platform(s) (iOS, Android, or both?): ios
  • Device info (Simulator/Device? OS version? Debug/Release?): All

tiennguyen9988 avatar Jan 18 '19 03:01 tiennguyen9988

Same here, push animation customisation doesn't seem to work on iOS.

I've defined custom animations for push, pop, showModal and dismissModal in Navigation.setDefaultOptions() as indicated in the documentations :

Navigation.setDefaultOptions({
    animations: {
        push: {
            content: {
                alpha: {
                    from: 0,
                    to: 1,
                }
            }
        },
        pop: {
            content: {
                alpha: {...}
            }
        },
        showModal: {
            alpha: {...}
        },
        dismissModal: {
            alpha: {...}
        }
    }
})

This worked perfectly on Android, but on iOS it doesn't seem to have any effect, all animations remain system defaults.

Someone knows if I've done something wrong ?

PS : I've tried to move the animation options from Navigation.setDefaultOptions() to Navigation.push(), but it produces the same results

rubeus90 avatar Jan 31 '19 14:01 rubeus90

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Mar 02 '19 15:03 stale[bot]

This is still an issue on RN v0.58.5 and RNN 2.12.0

ghost avatar Mar 05 '19 15:03 ghost

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.

stale[bot] avatar Apr 04 '19 15:04 stale[bot]

this still seems to be an issue.

Pushplaybang avatar Apr 08 '19 22:04 Pushplaybang

The current documentation is a bit confusing.

Supported only on Android is just mentioned for one of the examples which is for setRoot's animation however none of the commands animation is working for IOS.

Maybe it's better to put this note under the main title (Animation properties).

el-lsan avatar Apr 09 '19 10:04 el-lsan

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.

support avatar May 02 '19 08:05 support

I'm finding that defining custom animations as above will break pushing screens on iOS 10. In my case the screen goes black. Changing device orientation will get the pushed screen to render again.

renrizzolo avatar May 30 '19 06:05 renrizzolo