Open zibs opened 7 years ago
I just came across this exact same problem and haven't really seen anyone suggest a fix or workaround. What you can do to solve it is to wrap everything inside of your Animatable into another View and apply the shadow to that one.
<Animatable.View>
<View style={{ shadowOffset: {width: 4, height: 4} }}>
<YourOtherView />
</View>
</Animatable.View>
It works like a charm for me, I hope that solution helps anyone else who also stumbles across this.
I needed to animate shadowOffset
, so I added/published a fix for this to @micimize/react-native-animatable
for anyone in urgent need of this functionality.
The implementation is a bit inelegant, and there are some other changes as well that I threw in for my own convenience (mainly distributing a compiled build for react-native-web
) so I want to clean it up before submitting an actual PR.
shadowOffset: {width: 4, height: 4}
+1
Is this still an issue today?
I'm trying to do a simple
Animated.View
fade in with some shadow props:On Android this works fine, and the shadow is applied properly, but it doesn't seem to be working on iOS. On iOS it seems like the shadowOffset is not being applied - although the shadowColor seems to be applying.
Any thoughts?