Files
denlvovich e001d74afe Update to VGSL6.0
4f8b5f480ade3f347d5f0a2d01a1618069bcb846
2024-07-12 20:33:42 +03:00

35 lines
881 B
Swift

import Foundation
import UIKit
import LayoutKit
import VGSL
public final class ShimmerViewProvider: ViewProvider {
private var view: UIView?
private let effectBeginTime: CFTimeInterval
private let style: ShimmerStyle
private let path: UIElementPath
public init(style: ShimmerStyle, effectBeginTime: CFTimeInterval, path: UIElementPath) {
self.style = style
self.effectBeginTime = effectBeginTime
self.path = path
}
public func loadView() -> ViewType {
if let view {
return view
}
let view = ShimmerView(style: style, effectBeginTime: effectBeginTime)
self.view = view
return view
}
public func equals(other: ViewProvider) -> Bool {
guard let other = other as? ShimmerViewProvider else {
return false
}
return style == other.style && effectBeginTime == other.effectBeginTime && path == other.path
}
}