LottieView

@objc(FWLottieView)
@objcMembers
open class LottieView : UIView, IndicatorViewPlugin, ProgressViewPlugin

Lottile插件视图,可用于加载、进度、下拉刷新等

Accessor

  • 设置或获取进度条大小,默认{37,37}

    Declaration

    Swift

    open var size: CGSize { get set }
  • 进度条当前颜色,暂不支持

    Declaration

    Swift

    open var color: UIColor
  • 设置内容边距,默认zero

    Declaration

    Swift

    open var contentInset: UIEdgeInsets { get set }
  • 停止动画时是否自动隐藏,默认true

    Declaration

    Swift

    open var hidesWhenStopped: Bool
  • 当前是否正在执行动画

    Declaration

    Swift

    open var isAnimating: Bool { get }
  • 当前动画速度,默认1

    Declaration

    Swift

    open var animationSpeed: CGFloat { get set }
  • 指示器进度,大于0小于1时自动显示

    Declaration

    Swift

    open var progress: CGFloat { get set }

Subviews

  • 当前LottieView视图

    Declaration

    Swift

    open lazy var animationView: AnimationView { get set }

Lifecycle

  • Undocumented

    Declaration

    Swift

    public init()
  • Undocumented

    Declaration

    Swift

    public override init(frame: CGRect)
  • Undocumented

    Declaration

    Swift

    public required init?(coder: NSCoder)

Public

  • 设置指示器进度,大于0小于1时自动显示

    Declaration

    Swift

    public func setProgress(_ value: CGFloat, animated: Bool)
  • 设置动画json文件

    Declaration

    Swift

    public func setAnimation(name: String, bundle: Bundle? = nil)
  • 设置动画Data数据

    Declaration

    Swift

    public func setAnimation(data: Data)
  • 开始加载动画

    Declaration

    Swift

    public func startAnimating()
  • 停止加载动画

    Declaration

    Swift

    public func stopAnimating()

Override

  • Undocumented

    Declaration

    Swift

    open override var frame: CGRect { get set }
  • Undocumented

    Declaration

    Swift

    open override var bounds: CGRect { get set }
  • Undocumented

    Declaration

    Swift

    open override func layoutSubviews()
  • Undocumented

    Declaration

    Swift

    open override var intrinsicContentSize: CGSize { get }
  • Undocumented

    Declaration

    Swift

    open override func sizeThatFits(_ size: CGSize) -> CGSize