Is there a way to figure out, how many degrees an view is rotated currently during an animation?

This is an old question but I came across this answer while trying to find the current rotation angle during a key frame animation:-

CALayer* layer = [self.layer presentationLayer];
float currentAngle = [[layer valueForKeyPath:@"transform.rotation.z"] floatValue];

Seems to work for me. Also, nice and concise.

Leave a Comment