Files
divkit/client/ios/DivKitExtensions/Animations/AnimationBlockView+UIViewRenderableBlock.swift
T
2023-03-28 12:17:21 +03:00

29 lines
683 B
Swift

import AVFoundation
import UIKit
import CommonCorePublic
import LayoutKit
extension LottieAnimationBlock {
static func makeBlockView() -> BlockView {
AnimationBlockView()
}
func canConfigureBlockView(_ view: BlockView) -> Bool {
view is AnimationBlockView
}
func configureBlockView(
_ view: BlockView,
observer _: ElementStateObserver?,
overscrollDelegate _: ScrollDelegate?,
renderingDelegate _: RenderingDelegate?
) {
let lottieView = view as! AnimationBlockView
if lottieView.animationHolder !== animationHolder {
lottieView.animatableView = animatableView.value
lottieView.animationHolder = animationHolder
}
}
}