Animate layer's properties like never before! ✨
Add the following to Package.swift
:
.package(url: "https://github.com/stateman92/LayerAnimation", exact: .init(0, 0, 1))
let label = UILabel()
label.text = "Test label"
label.layer.backgroundColor = UIColor.white.cgColor
label.layer.animate(to: CALayer.LayerAnimatable.backgroundColor(.green), with: 5) {
print("Finished: \($0)")
}
For details see the Example app.