I have a image that rotates around a few times by random and then disappears. After it appears again, I want it to be in the original state. Not rotated. I would keep track of how many rotations I applied randomly and then calculate how many radians I have to re-do that. But I slightly remember from the big docs that there was some identity transformation thing. Is that what I am looking for? Just want to ask before I spent a whole day in finding it to then know it's not the right thing ;)
In code, that will look like:
yourView.transform = CGAffineTransformIdentity;
Yes, you want to set the transformation matrix to the identity transform; that will have the effect of "resetting" the transformation.
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