Refactoring

This commit is contained in:
Isaac
2024-06-12 23:04:04 +04:00
parent 1b1846dc63
commit 9a075fa39e
360 changed files with 1830 additions and 1713 deletions

View File

@@ -67,7 +67,7 @@ open class DynamicCornerRadiusView: UIView {
fatalError("init(coder:) has not been implemented")
}
public func update(size: CGSize, corners: Corners, transition: Transition) {
public func update(size: CGSize, corners: Corners, transition: ComponentTransition) {
let params = Params(size: size, corners: corners)
if self.params == params {
return
@@ -76,13 +76,13 @@ open class DynamicCornerRadiusView: UIView {
self.update(params: params, transition: transition)
}
public func updateColor(color: UIColor, transition: Transition) {
public func updateColor(color: UIColor, transition: ComponentTransition) {
if let shapeLayer = self.layer as? CAShapeLayer {
transition.setShapeLayerFillColor(layer: shapeLayer, color: color)
}
}
private func update(params: Params, transition: Transition) {
private func update(params: Params, transition: ComponentTransition) {
if let shapeLayer = self.layer as? CAShapeLayer {
transition.setShapeLayerPath(layer: shapeLayer, path: generatePath(size: params.size, corners: params.corners))
}