How to play Lottie animations in objective c


How to play Lottie animations in objective c



I have install pod files for Lottie and downloaded the hello.json file from lottiefiles.com


LOTAnimationView *Hello_loader;
Hello_loader = [LOTAnimationView animationNamed:@"hello"];
[self.view addSubview:Hello_loader];



I had tried it in both viewDidLoad() and viewDidAppear() but still, it does not appear


viewDidLoad()


viewDidAppear()



I am new to this ios programming can anyone please help me to resolve this?. Thanks in advance...




1 Answer
1



try this


LOTAnimationView *Hello_loader;
Hello_loader = [LOTAnimationView animationNamed:@"hello"];
[self.view addSubview:Hello_loader];
[self.Hello_loader play];





Still not working... it's viewing the blank page @IOS
– RK ios
Jun 30 at 7:40






try this [self. Hello_loader play];
– IOS
Jun 30 at 7:43





the above code throws an error [Property 'hello_loader' not found on object of type 'ViewController *']
– RK ios
Jun 30 at 7:48





check edited answer bcs you already declare Hello_loader object
– IOS
Jun 30 at 7:51





it is working...but no as my wish it just showing the line but i wanted to show is linked above can you please help me
– RK ios
Jun 30 at 8:06






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Render GeoTiff to on browser with leaflet

How to get chrome logged in user's email id through website

using states in a react-navigation without redux