Sitemap

Swift 5 Add A Lottie?

2 min readSep 21, 2020

--

iOS app always need cool animation

畫面生動有趣,動畫絕對是好幫手。

七個步驟讓你使用好Lottie。

Step1. pod Lottie

Press enter or click to view image in full size

Step2. import Lottie

Press enter or click to view image in full size
Lottie

Step3. create a UIView for Lottie

Step4. Add a Lottie Json into your project

推薦自己製作索引來使用不同的Lottie

Press enter or click to view image in full size

Step5. In swift file, annonce a var.(ex. var lottie = Animation(named: ))

Press enter or click to view image in full size

Step6. Setup Animation like below picture

Press enter or click to view image in full size

Step7. Your announce var.play()

Press enter or click to view image in full size

ps. 播放的相關設定下一篇文章告訴大家 (advance setting for next article)

--

--

SysLayer
SysLayer

Written by SysLayer

Backend system design, distilled. SQL-first guides for developers who build real products.