Swiftpack.co - LukasHromadnik/Lottie-SwiftUI as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by LukasHromadnik.
LukasHromadnik/Lottie-SwiftUI 1.2.2
SwiftUI wrapper of Lottie-iOS
⭐️ 11
🕓 1 year ago
iOS
.package(url: "https://github.com/LukasHromadnik/Lottie-SwiftUI.git", from: "1.2.2")

Lottie-SwiftUI

SwiftUI wrapper of Lottie-iOS. Very simple implementation that can be further expanded.

Currently only supports loopMode, other properties are not implemented yet. Feel free to create a pull request!

Installation

Swift Package Manager

import PackageDescription

let package = Package(
    name: "YourProjectName",
    platforms: [
        .iOS(.v13),
    ],
    dependencies: [
        .package(
            name: "LottieSwiftUI", 
            url: "https://github.com/LukasHromadnik/Lottie-SwiftUI.git",
            .upToNextMajor(from: Version(1, 1, 0))
        )
    ],
    targets: [
        .target(name: "YourTestProject", dependencies: ["LottieSwiftUI"])
    ]
)

Usage

import LottieSwiftUI

@State var playLottie = false

LottieView(name: "animation-name", play: $playLottie)
    .lottieLoopMode(.loop)

GitHub

link
Stars: 11
Last commit: 29 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

1 year ago

Changed

Update to Lottie 4. #3 #4 by @waterskier2007

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics