Home > Software engineering >  Xamarin forms iOS splash screen with lottie animation before Xamarin App starts
Xamarin forms iOS splash screen with lottie animation before Xamarin App starts

Time:12-12

I have implemented the Lottie animation splash screen on android with the new Intent, is there a way to do the same in iOS.

I know LaunchScreen.storyboard is unable to do this, but is there a way to generate a new UIViewController show it on screen with Lottie animation, and while the animation is playing in I will prepare Xamarin App in background task, and when animation ends call LoadApplication(app).

Or is there any other way to start playing Lottie animation first when you launch your app on iOS ?

Setting Lottie animation as the main page in Xamarin Forms is not an option, waiting on Xamarin Forms to start the app will take a few seconds and during that time I wanna show animation, not after.

CodePudding user response:

  1. iOS Launch screen can't animate. If startup time is an issue, and you want to show some animation, would need to write some "native code" (Xamarin.IOS is fine) that does an animation, while you have a background task do Xamarin Forms Init and load App ResourceDictionary. Details TBD, if someone demonstrates that they actually have a serious iOS load-time problem with Xamarin Forms.

  2. OP (Original Poster) tested the time on iPhone, and concluded that it was fast enough to not be worth doing an animation to make that time more interesting. (On typical Android devices the startup time was longer.)

  • Related