1

I am trying to make a background animation which changes the color. I used the code in other parts of my app before and it worked perfectly fine.

However, now the animation seems to have no duration. The background color changes immediately. I tried different values for the withDuration parameter and the result is always the same.

UIView.animate(withDuration: 2) {
                self.view.backgroundColor = UIColor.blue}

Thank you for any help!

0 Answers0