Created
June 30, 2018 07:17
-
-
Save HerbertLim/3cf1bdf2107ac58addddddcf1e3d3f98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Better way to show and hide window | |
*/ | |
Animated.sequence([ | |
Animated.parallel([ // 윈도우를 슬라이드인, 페이드인 한다. | |
Animated.timing( | |
this.state.fadeAnim, | |
{ | |
toValue: 1, | |
duration: isAndroid ? androidDuration : iosDuration, | |
easing: Easing.in(), | |
useNativeDriver, | |
} | |
), | |
Animated.timing( | |
this.state.transY, | |
{ | |
toValue: shouldFix ? 0 : -visibleWindowHeight, | |
duration: isAndroid ? androidDuration : iosDuration, | |
easing: Easing.elastic(), | |
useNativeDriver, | |
} | |
) | |
]), | |
Animated.delay(4000), | |
Animated.parallel([ | |
Animated.timing( | |
this.state.fadeAnim, | |
{ | |
toValue: 0.01, | |
duration: isAndroid ? androidDuration : iosDuration, | |
easing: Easing.back(), | |
useNativeDriver, | |
} | |
), | |
Animated.timing( | |
this.state.transY, | |
{ | |
toValue: 0, | |
duration: isAndroid ? androidDuration : iosDuration, | |
easing: Easing.back(), | |
useNativeDriver, | |
} | |
) | |
]), | |
]).start( () => { this.props.closeSimpleAqiGuideNoti() }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment