You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
672 B

2 years ago
2 years ago
2 years ago
  1. //
  2. // LottieImageProvider.swift
  3. // lottie-swift
  4. //
  5. // Created by Brandon Withrow on 1/25/19.
  6. //
  7. import CoreGraphics
  8. import Foundation
  9. /// Image provider is a protocol that is used to supply images to `AnimationView`.
  10. ///
  11. /// Some animations require a reference to an image. The image provider loads and
  12. /// provides those images to the `AnimationView`. Lottie includes a couple of
  13. /// prebuilt Image Providers that supply images from a Bundle, or from a FilePath.
  14. ///
  15. /// Additionally custom Image Providers can be made to load images from a URL,
  16. /// or to Cache images.
  17. public protocol AnimationImageProvider {
  18. func imageForAsset(asset: ImageAsset) -> CGImage?
  19. }