But the issue is that, only the first time the completion block gets executed and the animation runs twice. But after that the completion block never gets executed and there are no print statements. I am not sure if there is an error with my code, any suggestions are welcomed.
Hi, My intent is to generate animation from 0-360 degree continuously. I tried to generate it using the following functions.
@IBAction func progressButtonTapped(sender: UIButton) { continuousAnimation() }
func continuousAnimation() { circularProgressView.animateFromAngle(0, toAngle: 360, duration: 5) { (completed) in if completed { self.continuousAnimation() print("completed = (completed)") } else { print ("completed = (completed)") } } }
But the issue is that, only the first time the completion block gets executed and the animation runs twice. But after that the completion block never gets executed and there are no print statements. I am not sure if there is an error with my code, any suggestions are welcomed.