@@ -69,7 +69,7 @@ class ParallaxScrollView extends Component {
69
69
70
70
animatedEvent = Animated . event (
71
71
[ { nativeEvent : { contentOffset : { y : this . scrollY } } } ] ,
72
- { useNativeDriver : true }
72
+ // { useNativeDriver: true }
73
73
)
74
74
75
75
render ( ) {
@@ -140,7 +140,7 @@ class ParallaxScrollView extends Component {
140
140
// Using Native Driver greatly optimizes performance
141
141
onScroll : Animated . event (
142
142
[ { nativeEvent : { contentOffset : { y : this . scrollY } } } ] ,
143
- { useNativeDriver : true , listener : this . _onScroll . bind ( this ) }
143
+ { listener : this . _onScroll . bind ( this ) }
144
144
)
145
145
// onScroll: this._onScroll.bind(this)
146
146
} ,
@@ -372,22 +372,19 @@ class ParallaxScrollView extends Component {
372
372
const { viewWidth } = this . state
373
373
const { scrollY } = this
374
374
if ( renderStickyHeader || renderFixedHeader ) {
375
- const p = pivotPoint ( parallaxHeaderHeight , stickyHeaderHeight )
375
+ const p = pivotPoint ( parallaxHeaderHeight , stickyHeaderHeight ) ;
376
+ let height = interpolate ( scrollY , {
377
+ inputRange : [ 0 , stickyHeaderHeight ] ,
378
+ outputRange : [ 0 , stickyHeaderHeight ] ,
379
+ extrapolate : 'clamp'
380
+ } ) ;
376
381
return (
377
- < View
378
- style = { [
379
- styles . stickyHeader ,
380
- {
381
- width : viewWidth ,
382
- ...( stickyHeaderHeight ? { height : stickyHeaderHeight } : null )
383
- }
384
- ] }
385
- >
382
+ < View style = { [ styles . stickyHeader , { width : viewWidth } ] } >
386
383
{ renderStickyHeader
387
384
? < Animated . View
388
385
style = { {
389
386
backgroundColor : backgroundColor ,
390
- height : stickyHeaderHeight ,
387
+ height,
391
388
opacity : interpolate ( scrollY , {
392
389
inputRange : [ 0 , p ] ,
393
390
outputRange : [ 0 , 1 ] ,
0 commit comments