CABasicAnimation has the toValue property which expects an id. But Quartz Core doesn’t work with UIColor, it wants a CGColor struct instead. How would I supply a color to a CABasicAnimation?
CABasicAnimation has the toValue property which expects an id. But Quartz Core doesn’t work
Share
Simply provide a
CGColorand typecast it towards anid.This example fades the background color from red to yellow over 1 second.
Another example as taken directly from Apple’s example code: