UIViewPropertyAnimator is Too Cute
[]
Public Object
let button = ... let animateOut = UIViewPropertyAnimator(duration: 1.0, curve: .easeInOut) { print("2 alpha=\(button.alpha)") button.alpha = 0.0 print("3 alpha=\(button.alpha)") } print("1 alpha=\(button.alpha)") animateOut.startAnimation() print("4 alpha=\(button.alpha)") Before starting the animation Before setting alpha to 0.0 After setting alpha to 0.0 After starting the animation For each property I want to animate, I need to find its Property object or create one.