I'm trying to make a simple animation in WatchKit. I want to blink the specific color, and then come back to black background. It all works fine... once. After this first blink nothing will happen. I've tried searching but couldn't find relevant answer. My guess it that I should somehow reset the state of the animation, but couldn't find any way to do that.
This is the code I'm using for the animation:
animate(withDuration: 0.2, animations: {
//set first color
//mainGroup is a WKInterfaceGroup
self.mainGroup.setBackgroundColor(color)
//set back black color
self.mainGroup.setBackgroundColor(UIColor.black)
})