When attempting to play an animation on Android the animation displays and plays correctly, however, on iOS the animation does not display.
When calling element.IsPlaying
we get the return value of true.
Lottie is correctly configured across both Android and iOS implementations, files are located in assets and root project folders for Android and iOS and the correct build actions are set.
Code:
public class xxx : ContentPage {
AnimationView element = new AnimationView();
public xxx()
{
element = new AnimationView() {
Loop = true,
AutoPlay = true,
Animation = "splashyloader.json",
WidthRequest = 400,
HeightRequest = 400,
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
IsVisible = true,
Speed=1
};
}
protected override void OnAppearing(){
element.Animation = "splashyloader.json";
element.Play();
}
}