본문 바로가기
iOS

Lottie(애니메이션 라이브러리)

by 하얀망고 2022. 10. 31.
728x90

Airbnb에서 제공해주는 라이브러리로 스플래시 화면을 만들 때 매우 유용하다.

https://github.com/airbnb/lottie-ios

 

GitHub - airbnb/lottie-ios: An iOS library to natively render After Effects vector animations

An iOS library to natively render After Effects vector animations - GitHub - airbnb/lottie-ios: An iOS library to natively render After Effects vector animations

github.com

이 라이브러리를 다운받고(선호방식은 SPM)

https://lottiefiles.com/search?q=Animations&category=animations&animations-page=1

 

Featured animations from our community

Featured collection of Free Lottie Animations created with Bodymovin.

lottiefiles.com

이 사이트로 들어가서 마음에 드는 애니메이션을 json파일로 다운받은뒤 파일로 옮겨준다.(레퍼런스 X)

 

구현 예시

이후에는 play() 메서드를 통해 해당 애니메이션을 구현해주면 된다.

클로저의 파라미터는 finish가 들어온다.

 

 

 

구현코드

My_lottie_ios.zip
0.13MB

구현영상

 

 

728x90

'iOS' 카테고리의 다른 글

MVVM패턴  (0) 2022.11.11
웹뷰 구현하기(WebView) - UIKit  (0) 2022.11.06
델리게이트 패턴(Delegate_Pattern)  (0) 2022.10.27

댓글