I've got a view where I need the animation to repeat with a completion handler and update labels. The animation only runs once and then it doesn't repeat.
Code Block let sums = ["add(5, 7)", "mult(6, 20)", "div(15, 3)", "mult(2, 1)"] let answers = [12, 120, 5, 2] func sumAnimation() { for i in 0...sums.count-1 { inputLbl.text = sums[i] inputLbl.frame = CGRect(x: 0, y: 13, width: Int(inputLbl.frame.width), height: Int(inputLbl.frame.height)) // move to 340 UIView.animate(withDuration: 3 - clockSpeed/2) { self.inputLbl.transform = CGAffineTransform(translationX: 700, y: 0) } completion: { (true) in self.outputLbl.text = "ansr(\(self.answers[i]))" } // End Completion } // End Loop } // End Func