Created
March 24, 2018 16:19
-
-
Save alexkuttig/f9026c785cc206c9a954dac33c7bc995 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if (Platform.OS === 'ios') { | |
let titleOpacity = this.state.scrollY.interpolate({ | |
inputRange: [0, 41, 48], | |
outputRange: [0, 0, 1], | |
extrapolate: 'clamp' | |
}); | |
let borderBottomColor = this.state.scrollY.interpolate({ | |
inputRange: [56, 57], | |
outputRange: ["#ffffff", '#f2f2f2'], | |
extrapolate: 'clamp' | |
}); | |
return ( | |
<Animated.View style={[styles.iOSTitleContainer, { | |
height: this.headerHeight, | |
opacity: titleOpacity, | |
borderBottomColor: borderBottomColor | |
}]}> | |
<Text style={styles.iOSTitle}> | |
{title} | |
</Text> | |
</Animated.View> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment