Animating UIButton configuration change – Ios swift
Modern UIButton configuration API allows for new way of setting button appearance. However the code below skips the animation entirely. @IBAction func buttonTouched(_ sender: UIButton) { sender.configuration?.background.backgroundColor = .green UIView.animate(withDuration: 0.4, delay: 0.5) { sender.configuration?.background.backgroundColor = .systemMint } } Similar…