HwangTaehyun / react-native-lottie-splash-screen

⚡ Lottie splash screen for your react native app!
MIT License
222 stars 62 forks source link

AppDelegate.m #27

Closed omniviewsports closed 2 years ago

omniviewsports commented 2 years ago

In the example app and the documentation one of the lines of code to add is as follow:

UIView *animationView = [t createAnimationViewWithRootView:rootView lottieName:@"loading"];

My project is called YourZone, so which of the following is correct?

A) UIView animationView = [t createAnimationViewWithRootView:rootView lottieName:@"YourZone"]; B) UIView animationView = [t createAnimationViewWithRootView:rootView YourZone:@"loading"];

dazweeja commented 2 years ago

It's not the project name, it's the asset name. If your lottie animation was "circle.json", you would add this file to your project and then the code would be:

UIView *animationView = [t createAnimationViewWithRootView:rootView lottieName:@"circle"];