Basically, I rotate the layer around a point like:
CATransform3D transform = CATransform3DIdentity; transform.m34 = 1.0 / -500; transform = CATransform3DTranslate(transform, rotationPoint.x-center.x, rotationPoint.y-center.y, 0.0); transform = CATransform3DRotate(transform, (rotationAngleFor) * M_PI / 180.0f, 0.0, 1.0, 0); transform = CATransform3DTranslate(transform, center.x-rotationPoint.x, center.y-rotationPoint.y, 0.0);
I also create a layer, add it to a larger layer, and then apply the transform to it:
[self.layer addSublayer:myLayer]
How to revive it?
Note. Inserting this into a UIView animation UIView does not work.
source share