LottiePluginView

@MainActor
open class LottiePluginView : UIView, IndicatorViewPlugin, ProgressViewPlugin

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

Accessor

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

    Declaration

    Swift

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

    Declaration

    Swift

    @MainActor
    open var indicatorColor: UIColor?
  • 设置内容边距,默认zero

    Declaration

    Swift

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

    Declaration

    Swift

    @MainActor
    open var hidesWhenStopped: Bool
  • 修改指示器进度时是否始终执行动画,默认false

    Declaration

    Swift

    @MainActor
    open var animateWhenProgress: Bool
  • 当前是否正在执行动画

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @MainActor
    open var progress: CGFloat { get set }

Subviews

  • 当前LottieView视图

    Declaration

    Swift

    @MainActor
    open lazy var animationView: LottieAnimationView { get set }

Lifecycle

  • Undocumented

    Declaration

    Swift

    @MainActor
    override public init(frame: CGRect)
  • Undocumented

    Declaration

    Swift

    @MainActor
    public required init?(coder: NSCoder)

Public

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

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @MainActor
    open func setAnimation(data: Data)
  • 开始加载动画

    Declaration

    Swift

    @MainActor
    open func startAnimating()
  • 停止加载动画

    Declaration

    Swift

    @MainActor
    open func stopAnimating()

Override

  • Undocumented

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    @MainActor
    override open func layoutSubviews()
  • Undocumented

    Declaration

    Swift

    @MainActor
    override open var intrinsicContentSize: CGSize { get }
  • Undocumented

    Declaration

    Swift

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