Hi I`m working with CATransform3D. Every time that I call the following method with the variable radian the UIImageView is rotated “radian * M_PI” from the previous angle. I trying to go back to the original state. There is any way to do that? I mind I want to sent a radian value i.e. 10 and that the view maintain these angle if is called more than once.
METHOD:
CATransform3D rotatedTransform = self.needleB.layer.transform;
rotatedTransform = CATransform3DRotate(rotatedTransform, radian * M_PI / 180.0, 0.0f, 0.0f, 1.0f);
self.needleB.layer.transform = rotatedTransform;
self.needleB.layer.anchorPoint = CGPointMake(0.5, 0.9);
self.needleB.center = CGPointMake(160, 250);
Thanks !!
To undo all transforms, assign the transform
property of your layer to CATransform3DIdentity
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With