Hello I am using lottie animations for the first time in react native , I got to a point where the lottie animation playes and when the animation finish with onAnimationFinish it should navigate to a new page, it works perfectly on android but when I test it on ios the animation plays and the when the animation ends it leaves you on the same page and and the onAnimationFinish didn't trigger.
const progress = useRef(new Animated.Value(0)).current;
const handleLikeAnimation = () => {
Animated.timing(progress, {
toValue: 1,
duration: 3000,
useNativeDriver: true,
}).start();
};
<View style={{justifyContent:'center', width, height}}>
<LottieView style={{width:50, height:100, alignSelf:'center'}} progress={progress} source={require('../assets/lottie/loaderlottie.json')} autoPlay loop={false} onAnimationFinish={() => navigation.navigate("Leaderboard" , currentcomp)}></LottieView>
</View>