在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:airbnb/lottie-ios开源软件地址:https://github.com/airbnb/lottie-ios开源编程语言:Swift 99.1%开源软件介绍:Android and React Native)Lottie for iOS, macOS (andairbnb.io/lottieView documentation, FAQ, help, examples, and more atLottie is a mobile library for Android and iOS that natively renders vector based animations and art in realtime with minimal code. Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with bodymovin, Sketch with Lottie Sketch Export, and from Haiku. For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. Since the animation is backed by JSON they are extremely small in size but can be large in complexity! Animations can be played, resized, looped, sped up, slowed down, reversed, and even interactively scrubbed. Lottie can play or loop just a portion of the animation as well, the possibilities are endless! Animations can even be changed at runtime in various ways! Change the color, position or any keyframable value! Lottie also supports native UIViewController Transitions out of the box! Here is just a small sampling of the power of Lottie Installing LottieLottie supports Swift Package Manager, CocoaPods and Carthage (Both dynamic and static). Github RepoYou can pull the Lottie Github Repo and include the Lottie.xcodeproj to build a dynamic or static library. CocoaPodsAdd the pod to your Podfile: pod 'lottie-ios' And then run: pod install After installing the cocoapod into your project import Lottie with import Lottie CarthageAdd Lottie to your Cartfile:
And then run:
In your application targets “General” tab under the “Linked Frameworks and Libraries” section, drag and drop lottie-ios.framework from the Carthage/Build/iOS directory that Swift Package Manager// swift-tools-version:5.1
import PackageDescription
let package = Package(
name: "YourTestProject",
platforms: [
.iOS(.v12),
],
dependencies: [
.package(name: "Lottie", url: "https://github.com/airbnb/lottie-ios.git", from: "3.2.1")
],
targets: [
.target(name: "YourTestProject", dependencies: ["Lottie"])
]
) And then import wherever needed: Adding it to an existent iOS Project via Swift Package Manager
If you have doubts, please, check the following links: After successfully retrieved the package and added it to your project, just import Objective-C SupportAs of 3.0 Lottie has been completely rewritten in Swift! For Objective-C support please use Lottie 2.5.3. Alternatively an Objective-C branch exists and is still active. The official objective c branch can be found here: Also check out the documentation regarding it here: Data collectionThe Lottie SDK does not collect any data. We provide this notice to help you fill out App Privacy Details. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论