Rename setTiming to applyAnimation

Summary:Given that you can do all kinds of animations other than `Animated.timing`, it made no sense to have `setTiming`. In addition, you can't intuitively tell that this is the callback where you would do custom animations.

The discussion took place on Discord with ericvicenti: https://discordapp.com/channels/102860784329052160/154015578669973504
Closes https://github.com/facebook/react-native/pull/6235

Differential Revision: D2999121

Pulled By: hedgerwang

fb-gh-sync-id: f587b865de11ba5e8dc9c430720252ffb5d12794
shipit-source-id: f587b865de11ba5e8dc9c430720252ffb5d12794
This commit is contained in:
Richard Lai
2016-03-08 23:31:27 -08:00
committed by Facebook Github Bot 0
parent 6470ff842b
commit f2483eb1ee
3 changed files with 12 additions and 12 deletions

View File

@@ -78,7 +78,7 @@ class NavigationAnimatedExample extends React.Component {
navigationState={navigationState}
style={styles.animatedView}
renderOverlay={this._renderHeader}
setTiming={(pos, navState) => {
applyAnimation={(pos, navState) => {
Animated.timing(pos, {toValue: navState.index, duration: 1000}).start();
}}
renderScene={this._renderCard}