I want to get the current CGAffineTransform from a uiview thats being animated with CGAffineTransformScale. I’m trying this line but it keeps crashing my app:
CGAffineTransform currentTransform = [[[self.layer presentationLayer]
valueForKeyPath:@"transform"] CGAffineTransformValue];
What am I doing wrong here? Basically I’m trying to “pause” the animation by first getting an accurate transform value, then removing all animations, then applying the state to the view so that it looks paused mid-animation.
The
transformproperty of aCALayeris aCATransform3D. Try getting theaffineTransformproperty.